immediato
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i immediato

Weekly Downloads

18

Version

1.1.0

License

MIT

Unpacked Size

3.81 kB

Total Files

5

Last publish

Collaborators

  • fabiospampinato