Utilities for javascript