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

1.0.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 --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

/immediato/

    Package Sidebar

    Install

    npm i immediato

    Weekly Downloads

    17

    Version

    1.0.0

    License

    none

    Unpacked Size

    6.13 kB

    Total Files

    12

    Last publish

    Collaborators

    • fabiospampinato