{"name":"set-immediate-shim","version":"4.0.0","description":"Simple setImmediate shim","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/set-immediate-shim.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava"},"keywords":["setimmediate","immediate","settimeout","timeout","shim","polyfill","ponyfill","messagechannel"],"devDependencies":{"ava":"^6.4.1","xo":"^1.2.2"},"_id":"set-immediate-shim@4.0.0","gitHead":"0446280ceb6afca19b1ae2cc3049d2be32907584","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/set-immediate-shim/issues"},"homepage":"https://github.com/sindresorhus/set-immediate-shim#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-ITNCbwiVRRYAUndnX15fevxRYurDFxDnBA6//Q9Ql7yabS9vCwwLrEhIy1ISaZRYPwgkfVDAdyUUBgieKI8JAQ==","shasum":"7745d43b511abd667228188cb38954959cafdd66","tarball":"http://registry-npm.ywwl.com/set-immediate-shim/download/set-immediate-shim-4.0.0.tgz","fileCount":5,"unpackedSize":4676,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICKrrU5MRYp9X5JYUgkeOF3Oc9Ge0YcK+SH3AR7ni0eeAiEA1mHhSFeE1RzD4Ugd27WaM2tRKPemZa360j6PLSBKlk4="}],"size":2205,"noattachment":false,"key":"/set-immediate-shim/-/set-immediate-shim-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/set-immediate-shim_4.0.0_1757753193306_0.9383099845172345"},"_hasShrinkwrap":false,"readme":"# set-immediate-shim\n\n> Simple [`setImmediate`](https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate) [ponyfill](https://ponyfill.com)\n\nThe shim uses the native `setImmediate` when available (Node.js), falls back to [`MessageChannel`](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel) for better performance in environments that support it (modern browsers, Deno), and uses `setTimeout` with zero delay as a last resort.\n\n## Install\n\n```sh\nnpm install set-immediate-shim\n```\n\n## Usage\n\n```js\nimport setImmediateShim from 'set-immediate-shim';\n\nsetImmediateShim(() => {\n\tconsole.log('2');\n});\n\nconsole.log('1');\n\n//=> 1\n//=> 2\n```\n\n## Related\n\n- [p-immediate](https://github.com/sindresorhus/p-immediate) - Returns a promise resolved in the next event loop - think `setImmediate()`\n","publish_time":1757753193489,"_cnpm_publish_time":1757753193489,"dist-tags":{"latest":"4.0.0"}}