JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8123
  • Score
    100M100P100Q129044F
  • License MIT

setImmediate polyfill for the browser and node

Package Exports

  • setasap

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (setasap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.