setasap
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/setasap package

2.0.1 • Public • Published

setAsap Build Status

setImmediate polyfill for the browser and node. This is an alternative to setTimeout(fn, 0), which behaves like setTimeout(fn, 4). setAsap will execute immediately. It has unmatched performance and is extremely lightweight.

Install

npm install setasap --save

Use

setAsap(function() {
  // do something async
});

Note

Currently, there is no way to cancel setAsap. The code base is much smaller without it.

/setasap/

    Package Sidebar

    Install

    npm i setasap

    Weekly Downloads

    12,703

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    9.18 kB

    Total Files

    9

    Last publish

    Collaborators

    • taylorhakes