{"library":"setimmediate","type":"library","category":null,"description":"The `setImmediate.js` package provides a robust, cross-browser polyfill and shim for the `setImmediate` and `clearImmediate` APIs, originally proposed by Microsoft to the Web Performance Working Group. On its current stable version 1.0.5 (last updated in 2016), it bridges the gap for efficient, non-blocking asynchronous execution, especially in older or less-spec-compliant environments. Unlike `setTimeout(..., 0)` or `process.nextTick` (in newer Node.js), `setImmediate` queues a task on the *macrotask* queue, yielding control back to the event loop before execution, allowing for rendering or I/O to occur. It differentiates itself by employing various \"clever tricks\" such as `postMessage`, `MessageChannel`, and historical browser-specific hacks (`<script> onreadystatechange`, `process.nextTick` in older Node) to achieve optimal performance and correct macrotask semantics across IE6+, Firefox 3+, WebKit, Opera 9.5+, and Node.js. In environments where these tricks aren't viable, it gracefully falls back to `setTimeout`, ensuring universal compatibility.","language":"javascript","status":"maintenance","version":"1.0.5","tags":["javascript"],"install":[{"cmd":"npm install setimmediate","imports":["// In Node.js: require('setimmediate');\n// In browser: Include <script src=\"setimmediate.js\"></script>\n// (setImmediate becomes a global function)","// No explicit import needed; `clearImmediate` is made global.","require('setimmediate');"]},{"cmd":"yarn add setimmediate","imports":[]},{"cmd":"pnpm add setimmediate","imports":[]}],"homepage":null,"github":"https://github.com/yuzujs/setImmediate","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/setimmediate","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/setimmediate/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}