use utils functions in js

Change-Id: Icb29b4d08377ed6e8042a9a61f574bd06709f351
Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>