setasap

setImmediate polyfill for the browser and node

MIT 10 个版本
安装
npm install setasap
yarn add setasap
pnpm add setasap
bun add setasap
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.

版本列表
2.0.1 2018-02-07
2.0.0 2016-04-14
1.1.0 2016-02-22
1.0.1 2015-11-17
1.0.0 2015-11-17
0.8.0 2015-01-09
0.7.3 2014-05-14
0.7.1 2014-05-14
0.6.1 2014-04-26
0.6.0 2014-04-26