A set of JS utility functions.