{"id":21041432,"url":"https://github.com/pladaria/requestidlecallback-polyfill","last_synced_at":"2025-05-15T16:33:49.046Z","repository":{"id":47718038,"uuid":"155061861","full_name":"pladaria/requestidlecallback-polyfill","owner":"pladaria","description":"requestIdleCallback Polyfill","archived":false,"fork":false,"pushed_at":"2023-05-03T22:19:10.000Z","size":7,"stargazers_count":34,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T05:49:33.890Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pladaria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-28T11:06:17.000Z","updated_at":"2025-01-18T16:06:17.000Z","dependencies_parsed_at":"2024-06-18T16:56:33.132Z","dependency_job_id":"6267926c-cdb4-4211-80f8-79d15b84dd76","html_url":"https://github.com/pladaria/requestidlecallback-polyfill","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"76338b35d0883eca1fb03e7a250c60860a09facb"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pladaria%2Frequestidlecallback-polyfill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pladaria%2Frequestidlecallback-polyfill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pladaria%2Frequestidlecallback-polyfill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pladaria%2Frequestidlecallback-polyfill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pladaria","download_url":"https://codeload.github.com/pladaria/requestidlecallback-polyfill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254377553,"owners_count":22061173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T13:52:09.892Z","updated_at":"2025-05-15T16:33:48.733Z","avatar_url":"https://github.com/pladaria.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# requestIdleCallback polyfill\n\nSimple polyfill and d.ts for\n[requestIdleCallback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback).\n\nFrom [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback):\n\n\u003e The `window.requestIdleCallback()` method queues a function to be called during a browser's idle periods.\n\u003e This enables developers to perform background and low priority work on the main event loop, without\n\u003e impacting latency-critical events such as animation and input response. Functions are generally called in\n\u003e first-in-first-out order; however, callbacks which have a timeout specified may be called out-of-order if\n\u003e necessary in order to run them before the timeout elapses.\n\n\u003e You can call `requestIdleCallback()` within an idle callback function to schedule another callback to take\n\u003e place no sooner than the next pass through the event loop.\n\n## Install\n\n`npm i requestidlecallback-polyfill`\n\nor\n\n`yarn add requestidlecallback-polyfill`\n\n## Usage\n\n```js\nimport 'requestidlecallback-polyfill';\n\n// ...\n\nwindow.requestIdleCallback(doSomething, {timeout: 2000});\n```\n\n## Credits\n\n-   Code from\n    [developers.google.com](https://developers.google.com/web/updates/2015/08/using-requestidlecallback)\n-   Type definitions from\n    [rhysd/Mstdn](https://github.com/rhysd/Mstdn/blob/master/typings/request-idle-callback.d.ts)\n\n## License\n\n-   Code: [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n-   Type definitions: [MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpladaria%2Frequestidlecallback-polyfill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpladaria%2Frequestidlecallback-polyfill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpladaria%2Frequestidlecallback-polyfill/lists"}