immediato

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

MIT 3 个版本
安装
npm install immediato
yarn add immediato
pnpm add immediato
bun add immediato
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

版本列表
1.1.0 2025-01-26
1.0.1 2025-01-17
1.0.0 2023-02-16