Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

set-immediate

0.1.1 • Public • Published

This package has been deprecated

Author message:

Use `setimmediate` instead

setImmediate

A simple and lightweight shim for the setImmediate W3C Draft API, for use in any browsers and NodeJS.

Example usage

You can include the script any way you want in a browser, in NodeJS environment, it is suggested that you do so by installing set-immediate from npm, and then including it using require('set-immediate'), preferably before any other dependencies, so that they can use it too (it is injected on the global object for browser < - > node compatibility).

 
setImmediate(function (foo, bar) {
    console.log(foo, bar);
}, ['foo', 'bar']);
 
var id = setImmediate(function () {});
 
clearImmediate(id);
 

Keywords

none

install

npm i set-immediate

Downloadsweekly downloads

4,838

version

0.1.1

license

none

repository

githubgithub

last publish

collaborators

  • avatar