{"id":20322105,"url":"https://github.com/alterebro/chain-timeout","last_synced_at":"2026-02-04T02:05:26.847Z","repository":{"id":34745452,"uuid":"183000452","full_name":"alterebro/chain-timeout","owner":"alterebro","description":"Execute chained setTimeout functions using requestAnimationFrame to improve performance","archived":false,"fork":false,"pushed_at":"2024-09-30T08:51:49.000Z","size":781,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-19T04:54:58.945Z","etag":null,"topics":["chain","chainable","chainable-functions","delay","queue","requestanimationframe","settimeout","timeout"],"latest_commit_sha":null,"homepage":"https://npm.im/chain-timeout","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alterebro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2019-04-23T11:28:31.000Z","updated_at":"2024-09-30T08:51:49.000Z","dependencies_parsed_at":"2023-01-15T08:55:47.281Z","dependency_job_id":"7d785696-2479-49a4-b83b-c5df161958e3","html_url":"https://github.com/alterebro/chain-timeout","commit_stats":{"total_commits":42,"total_committers":2,"mean_commits":21.0,"dds":0.4285714285714286,"last_synced_commit":"aefacbcc9d0ce109ec0f6629c476fe225aedc812"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/alterebro/chain-timeout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alterebro%2Fchain-timeout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alterebro%2Fchain-timeout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alterebro%2Fchain-timeout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alterebro%2Fchain-timeout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alterebro","download_url":"https://codeload.github.com/alterebro/chain-timeout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alterebro%2Fchain-timeout/sbom","scorecard":{"id":187107,"data":{"date":"2025-08-11","repo":{"name":"github.com/alterebro/chain-timeout","commit":"f322f4c31506b35b89c74098db8c44c11443c1b0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 15 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T19:58:54.098Z","repository_id":34745452,"created_at":"2025-08-16T19:58:54.098Z","updated_at":"2025-08-16T19:58:54.098Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29064239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T01:55:38.219Z","status":"online","status_checked_at":"2026-02-04T02:00:07.999Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chain","chainable","chainable-functions","delay","queue","requestanimationframe","settimeout","timeout"],"created_at":"2024-11-14T19:19:08.213Z","updated_at":"2026-02-04T02:05:26.827Z","avatar_url":"https://github.com/alterebro.png","language":"JavaScript","readme":"\u003cp\u003e\n    \u003cimg src=\"static/chain-timeout.png\" alt=\"chain-timeout\" width=\"175\" /\u003e\n\u003c/p\u003e\n\n[![MIT license](https://img.shields.io/github/license/alterebro/chain-timeout.svg)](https://github.com/alterebro/chain-timeout/blob/master/LICENSE) [![NPM Version](https://img.shields.io/npm/v/chain-timeout.svg)](https://www.npmjs.com/package/chain-timeout) [![gzip File Size](http://img.badgesize.io/https://unpkg.com/chain-timeout/dist/chain-timeout.min.js?compression=gzip)](https://unpkg.com/chain-timeout/dist/chain-timeout.min.js) [![Twitter Follow](https://img.shields.io/twitter/follow/alterebro.svg?color=%2338A1F3\u0026style=popout)](https://twitter.com/alterebro)\n\n\n# chain-timeout\n\n**Execute chained setTimeout functions using requestAnimationFrame to improve performance**. \u003cbr\u003eBy using `requestAnimationFrame` the timeout defined will only run when the document is active, if the document browser or tab is placed on background the script won't be executed therefore performance will not be affected and battery life will be saved :)\n\n\n## Install\n\n```sh\n$ npm install chain-timeout\n```\n\nThis module is available in three flavours:\n\n| Flavour       | Path          |\n| ------------- | ------------- |\n| **ES Module** | `dist/chain-timeout.mjs`      |\n| **CommonJS**  | `dist/chain-timeout.js`       |\n| **UMD**       | `dist/chain-timeout.min.js`   |\n\nInclude `chain-timeout`:\n\n```javascript\n// ES6\nimport chainTimeout from 'chain-timeout'\n\n// CJS\nconst chainTimeout = require('chain-timeout');\n```\n\nTo use it on the browser include the UMD minified file ( `dist/chain-timeout.min.js` ).\nYou can also add the script directly from [unpkg.com](https://unpkg.com/chain-timeout):\n\n```html\n\u003cscript src=\"https://unpkg.com/chain-timeout\"\u003e\u003c/script\u003e\n```\n\n\n## Usage\n\nInclude it and create a *chain* :\n\n```javascript\nimport chainTimeout from 'chain-timeout';\n\nconst chain = chainTimeout( fn, delay ).chainTimeout( fn, delay )...\n```\n\nExample :\n\n```javascript\nconst chain = chainTimeout( () =\u003e console.log('hello!'), 2000 )\n    .chainTimeout( () =\u003e console.log('...'), 3000 )\n    .chainTimeout( () =\u003e console.log('bye!'), 1000 );\n/*\n    -\u003e Outputs the string 'hello!' after 2000ms.\n    -\u003e Then outputs the string '...' 3000ms after the first message.\n    -\u003e Finally outputs 'bye!' when 1000ms have passed since previous function.\n*/\n```\n\n\n## API\n\n### chainTimeout(function, delay)\n\nReturns an `Object` with `chainTimeout()` itself to get chained and `clear()` method to cancel the execution chain.\n\n#### \u0026mdash; function\n\nType : `function`. Function to get executed once the time set on the delay is reached\n\n#### \u0026mdash; delay\n\nType : `number`. Number defining the milliseconds to wait before the function is executed.\n\n### chain.clear()\n\nCancels the execution chain.\n\n```javascript\nconst chain = chainTimeout(fn, delay)\n\t.chainTimeout(fn, delay)\n\t.chainTimeout(fn, delay):\n\nchain.clear() // Cancels chain\n```\n\n## License\n\nMIT © 2019 [Jorge Moreno](https://moro.es), [@alterebro](https://twitter.com/alterebro)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falterebro%2Fchain-timeout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falterebro%2Fchain-timeout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falterebro%2Fchain-timeout/lists"}