Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 579 Bytes

readme.md

File metadata and controls

31 lines (19 loc) · 579 Bytes

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 --save immediato

Usage

import {setImmediate, clearImmediate} from 'immediato';

// Scheduling a function for execution

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

// Cancelling a scheduled function

clearImmediate ( immediateId );

License

MIT © Fabio Spampinato