Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

immediato

fabiospampinato976MIT1.1.0TypeScript support: included

An isomorphic setImmediate implementation that doesn't prevent the process from exiting naturally.

immediate, setImmediate, clearImmediate

readme

Immediato

An isomorphic setImmediate implementation that doesn't prevent the process from exiting naturally.

This implementation requires the MessageChannel API, so it works the same everywhere, and the implementation is tiny.

Install

npm install immediato

Usage

import {setImmediate, clearImmediate} from 'immediato';

// Let's scheduling a function for execution

const immediateId = setImmediate ( () => {
  // Do something...
});

// Let's cancel a scheduled function

clearImmediate ( immediateId );

License

MIT © Fabio Spampinato