Skip to content
main
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

set-immediate-shim

Simple setImmediate ponyfill

Note: This shim is quite inefficient, see #4.

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.

About

Simple `setImmediate` shim

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published