0.0.2 • Published 9 years ago

chaotic-cb v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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

0.0.2

9 years ago

0.0.1

9 years ago