Set a timeout for an async (callback async) function
$ npm install zd-timeout
const {
timeout
} = require('zd-timeout');
function request(a, b, callback){/*...*/}
let requestLimitedTo1Minute = timeout(request, 60 * 1000);
var a = 1;
var b = 2;
requestLimitedTo1Minute(a, b, function(err, data){/*...*/}
timeout(fn, milliseconds)