Node.js: Moved utility functions to utils.js