chaotic-cb
v0.0.2
Published
introduce chaos to callbacks (inject errors occasionally)
Readme
SYNOPSIS
Return a callback that errors randomly with a particular ratio.
USAGE
var chaos = require('chaotic-cb')(0.9);
var cb = chaos(function(err, res) { console.log(err?err:res); });
cb(null, "testing...");
var cb = chaos(0.9, function(err, res) { console.log(err?err:res); });
cb(null, "I probably won't happen...");See the example
