0.0.1 • Published 9 years ago
safecb v0.0.1
safecb
var safe = require('safecb')
function doStuff (cb) {
cb = safe(cb)
// prevent these typical problems:
cb() // synchronous invocation
cb() // multiple invocations
cb() // undefined is not a function (if cb is undefined)
}
0.0.1
9 years ago