Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 380 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 380 Bytes

Install

npm i -S error-throwing-middleware

Use

var thrower = require('error-throwing-middleware');
app.use(thrower);

Now you randomly get errors! :)

You can also change the frequency (defaults to ~60% of the time.)

var thrower = require('error-throwing-middleware');
app.use(thrower.frequency(0.9)); // throw ~90% of the time.