ActiveSupport-like helper functions for JavaScript