# tiny-set-immediate

> A minimal polyfill of setImmediate, for modern browsers using `window.postMessage`, and `MessageChannel` in workers.

Latest version **1.0.2** (published 2021-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install tiny-set-immediate
pnpm add tiny-set-immediate
yarn add tiny-set-immediate
bun add tiny-set-immediate
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-12-15 |
| First published | 2021-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | jquense |
| Maintainers | monastic.panic |

## Links

- npm: https://www.npmjs.com/package/tiny-set-immediate
- Repository: https://github.com/jquense/tiny-set-immediate
- Homepage: https://github.com/jquense/tiny-set-immediate#readme
- Issues: https://github.com/jquense/tiny-set-immediate/issues
- npm.io page: https://npm.io/package/tiny-set-immediate

## Recent versions

- 1.0.2 (latest) — 2021-12-15
- 1.0.1 — 2021-12-15

## README

# tiny-set-immediate

A minimal polyfill of setImmediate, for modern browsers using `window.postMessage`, and `MessageChannel` in workers.

If the native functions are available they will be returned instead of a polyfill.

```ts
import { setImmediate, clearImmediate } from 'tiny-set-immediate';

const handle = setImmediate(
  (...args) => {
    console.log(args);
  },
  [1, 2],
);

clearImmediate(handle);
```

This implementation does not allow string callbacks, and will not eval it.

---
_Source: https://npm.io/package/tiny-set-immediate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
