set-immediate

A shim for the setImmediate API

Use `setimmediate` instead
Last updated 12 years ago by jussi-kalliokoski .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install set-immediate 
SYNC missed versions from official npm registry.

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);

Current Tags

  • 0.1.1                                ...           latest (12 years ago)

2 Versions

  • 0.1.1 [deprecated]           ...           12 years ago
  • 0.1.0                                ...           13 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |