ecb
v1.0.0
Published
create error-first callbacks from separate error and success handlers
Downloads
3,484
Readme
var ecb = require('ecb')
doSomething(ecb(done, function (result) {
console.log(result)
})
is short for
doSomething(function (error, result) {
if (error) {
done(error)
} else {
console.log(result)
}
})