JavaScript utilities module, suitable for both Node.js and client-side use