Nitroglycerin
Makes JavaScript functions so volatile and explosive that they immediately throw on errors.
This is mostly useful for testing and simple command-line scripts. In production you most likely don't want to throw exceptions.
How it works
Let's say you have a small piece of test code that needs to set something up:
resetDatabase if err then throw err createUser name: 'Alfred Nobel' if err then throw err # run your tests using alfred here
Checking that these calls didn't error out requires a bit of ceremony in Node.js, either in the form of manual error checking as described above, promises, or async.waterfall. Nitroglycerin removes most of this ceremony:
N = require 'nitroglycerin' resetDatabase N -> createUser name: 'Alfred Nobel'N # run your tests using alfred here
The functions wrapped in Nitroglycerin will immediately throw an exception when they receive an error or execute the callback with the error argument stripped.
Development
See the developer documentation