Utils for javascript