async-timeout

1.0.2 • Public • Published

async-timeout

async-timeout is a simple async task wrapper which triggers the callback. It supresses errors (by default), thus uses the timeout fallbacks also as an error fallback.

    var timeout = require('async-timeout');
    async.parallel([
      timeout(function noop(){
        // never call back
      }, 1000, 'FALLBACK RESP IN CASE OF TIMEOUT')
    ], function(err, res) {
      console.log(res[0]);
    });

Package Sidebar

Install

npm i async-timeout

Weekly Downloads

2

Version

1.0.2

License

ISC

Last publish

Collaborators

  • ifroz