Skip to content
Simple `setImmediate` shim
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Tidelift tasks Sep 10, 2019
.editorconfig Require Node.js 6 Mar 25, 2018
.gitattributes Require Node.js 8 Sep 10, 2019
.gitignore Require Node.js 6 Mar 25, 2018
.npmrc Require Node.js 6 Mar 25, 2018
.travis.yml Require Node.js 8 Sep 10, 2019
index.js Require Node.js 8 Sep 10, 2019
license Require Node.js 6 Mar 25, 2018
package.json Require Node.js 8 Sep 10, 2019
readme.md Tidelift tasks Sep 10, 2019
test.js Require Node.js 8 Sep 10, 2019

readme.md

set-immediate-shim Build Status

Simple setImmediate ponyfill

Install

$ npm install set-immediate-shim

Usage

const setImmediateShim = require('set-immediate-shim');

setImmediateShim(() => {
	console.log('2');
});

console.log('1');

//=> 1
//=> 2

Related

  • p-immediate - Returns a promise resolved in the next event loop - think setImmediate()

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
You can’t perform that action at this time.