Timeout function decorator
$ component install component/timeout
var timeout = require('timeout');
function something(fn) {
setTimeout(function(){
fn(null, 'results');
}, 1000);
}
something = timeout(something, 500);
Apply timeout of ms
to callback
and return the new function.
MIT