Utilities for JavaScript generic functions.