utility to wrap error calling async's into error throwing async's

npm install throwify
2 downloads in the last week
4 downloads in the last month


for these throwier times... (or at least for versions of node that include domains)

build status


turn a node-style (exception callback into a ( callback that throws

var throwify = require('throwify');
var fs = require('fs');

var stat = throwify(fs.stat);

stat('some/file', function(stats) {
    //do something with stats object


handling node-style error callbacks injects complexity into almost everything you'll write. often it's convenient and possible to wrap a discrete chunk of code in a domain and localize the exception handling there.

npm loves you