general propose utils for javascript