Enhanced Node.js built-in util module


better-util is adding functions to the built-in module util. This way you can require better-util instead of util and still have access to all the useful functions.

List of methods

Verify is the object is empty or not.


  • obj: object to be tested
util = require "better-util"
util.isEmpty {}
util.isEmpty new Object()
console.log "both of these calls return true"
if {}
    console.log "Oups an empty object returns true! I should use better-util instead."