{"id":15357157,"url":"https://github.com/chocolateboy/async-any","last_synced_at":"2026-02-06T17:36:16.165Z","repository":{"id":48568995,"uuid":"133442631","full_name":"chocolateboy/async-any","owner":"chocolateboy","description":"Manage various forms of asynchronous completion in a uniform way","archived":false,"fork":false,"pushed_at":"2021-07-20T05:27:53.000Z","size":1079,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T01:44:37.208Z","etag":null,"topics":["async","async-completion","callback","complete","completion","done","node-module","npm-module","promise","promises"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chocolateboy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-15T01:36:57.000Z","updated_at":"2021-11-02T22:20:16.000Z","dependencies_parsed_at":"2022-09-26T20:00:52.772Z","dependency_job_id":null,"html_url":"https://github.com/chocolateboy/async-any","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/chocolateboy/async-any","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chocolateboy%2Fasync-any","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chocolateboy%2Fasync-any/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chocolateboy%2Fasync-any/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chocolateboy%2Fasync-any/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chocolateboy","download_url":"https://codeload.github.com/chocolateboy/async-any/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chocolateboy%2Fasync-any/sbom","scorecard":{"id":278546,"data":{"date":"2025-08-11","repo":{"name":"github.com/chocolateboy/async-any","commit":"4b137555b45ac12fc44c4d6d23cf2e2b4bf37236"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Artistic License 2.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 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":0,"reason":"41 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr","Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-jv35-xqg7-f92r","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"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-17T15:08:31.898Z","repository_id":48568995,"created_at":"2025-08-17T15:08:31.898Z","updated_at":"2025-08-17T15:08:31.898Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29170291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T16:33:35.550Z","status":"ssl_error","status_checked_at":"2026-02-06T16:33:30.716Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["async","async-completion","callback","complete","completion","done","node-module","npm-module","promise","promises"],"created_at":"2024-10-01T12:33:36.652Z","updated_at":"2026-02-06T17:36:16.140Z","avatar_url":"https://github.com/chocolateboy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-any\n\n[![Build Status](https://travis-ci.org/chocolateboy/async-any.svg)](https://travis-ci.org/chocolateboy/async-any)\n[![NPM Version](https://img.shields.io/npm/v/async-any.svg)](https://www.npmjs.org/package/async-any)\n\n\u003c!-- toc --\u003e\n\n- [NAME](#name)\n- [FEATURES](#features)\n- [INSTALLATION](#installation)\n- [SYNOPSIS](#synopsis)\n- [DESCRIPTION](#description)\n  - [Why?](#why)\n  - [Why Not?](#why-not)\n- [TYPES](#types)\n- [EXPORTS](#exports)\n  - [asyncAny (default)](#asyncany-default)\n- [DEVELOPMENT](#development)\n  - [NPM Scripts](#npm-scripts)\n- [COMPATIBILITY](#compatibility)\n- [SEE ALSO](#see-also)\n- [VERSION](#version)\n- [AUTHOR](#author)\n- [COPYRIGHT AND LICENSE](#copyright-and-license)\n\n\u003c!-- tocstop --\u003e\n\n# NAME\n\nasync-any - manage various forms of asynchronous completion in a uniform way\n\n# FEATURES\n\n  - more lightweight than [async-done](https://www.npmjs.com/package/async-done)\n  - works in Node.js and the browser\n  - fully typed (TypeScript)\n\n# INSTALLATION\n\n    $ npm install async-any\n\n# SYNOPSIS\n\n```javascript\nimport asyncAny from 'async-any'\n\n// a task is an asynchronous function which either takes a `done` callback\nconst task = done =\u003e fs.stat(path, done)\n\n// or returns a promise\nconst task = () =\u003e fetch(url)\n\n// asyncAny treats them uniformly and either passes the task's result to a callback\nasyncAny(task, (error, result) =\u003e { ... })\n\n// or returns it as a promise\nconst result = await asyncAny(task)\n```\n\n# DESCRIPTION\n\nThis module exports a function which provides a uniform way to handle tasks\nwhich signal completion asynchronously, either by calling a callback or\nreturning a promise.\n\n## Why?\n\nI needed a lightweight version of\n[async-done](https://www.npmjs.com/package/async-done) with an optional promise\nAPI and browser support.\n\n## Why Not?\n\nasync-any doesn't support event emitters, observables, ChildProcess or other\nkinds of Node.js [streams](https://github.com/substack/stream-handbook) (unless\nthey [also](https://github.com/sindresorhus/cp-file) happen to be promises). If\nyou need support for these, use an adapter such as\n[event-to-promise](https://www.npmjs.com/package/event-to-promise) or\n[observable-to-promise](https://www.npmjs.com/package/observable-to-promise),\nor use async-done.\n\n# TYPES\n\nThe following types are referenced in the descriptions below.\n\n```typescript\ntype Callback\u003cT\u003e = (err: any, result?: T) =\u003e void;\ntype PromiseTask\u003cT\u003e = () =\u003e PromiseLike\u003cT\u003e;\ntype CallbackTask\u003cT\u003e = (done: Callback\u003cT\u003e) =\u003e void;\ntype Task\u003cT\u003e = PromiseTask\u003cT\u003e | CallbackTask\u003cT\u003e;\n```\n\n# EXPORTS\n\n## asyncAny (default)\n\n**Signature**:\n\n- `asyncAny\u003cT\u003e(task: Task\u003cT\u003e, callback: Callback\u003cT\u003e): void`\n- `asyncAny\u003cT\u003e(task: Task\u003cT\u003e): Promise\u003cT\u003e`\n\n```javascript\nimport asyncAny from 'async-any'\n\nfunction runTask (task) {\n    asyncAny(task, (error, result) =\u003e {\n        if (!error) console.log('got result:', result)\n    })\n}\n\n// or\n\nasync function runTask (task) {\n    const result = await asyncAny(task)\n    console.log('got result:', result)\n}\n```\n\nTakes an asynchronous task (function) and an optional callback. The task is\npassed a `done`\n[\"errorback\"](https://thenodeway.io/posts/understanding-error-first-callbacks/)\nfunction which can be used to signal completion. Alternatively, the task can\nreturn a promise and is deemed complete when it succeeds or fails.\n\nOnce the task has completed, its error/result is forwarded to the callback. If\nthe callback is omitted, a promise is returned, which is fulfilled/rejected by\nthe task's corresponding result/error.\n\n# DEVELOPMENT\n\n\u003cdetails\u003e\n\n## NPM Scripts\n\nThe following NPM scripts are available:\n\n- build - compile the library for testing and save to the target directory\n- build:release - compile the library for release and save to the target directory\n- clean - remove the target directory and its contents\n- doctoc - generate the README's TOC (table of contents)\n- rebuild - clean the target directory and recompile the library\n- test - recompile the library and run the test suite\n- test:run - run the test suite\n- typecheck - sanity check the library's type definitions\n\n\u003c/details\u003e\n\n# COMPATIBILITY\n\nThe following [targets](https://browserl.ist/?q=Maintained+Node+versions%2C+Last+2+Chrome+versions%2C+Last+2+Safari+versions%2C+Firefox+ESR) are supported:\n\n- Firefox ESR\n- Last 2 Chrome versions\n- Last 2 Safari versions\n- [Maintained Node.js versions](https://github.com/nodejs/Release#readme)\n\n# SEE ALSO\n\n* [always-done](https://www.npmjs.com/package/always-done)\n* [async-done](https://www.npmjs.com/package/async-done)\n* [function-done](https://www.npmjs.com/package/function-done)\n\n# VERSION\n\n2.0.0\n\n# AUTHOR\n\n[chocolateboy](mailto:chocolate@cpan.org)\n\n# COPYRIGHT AND LICENSE\n\nCopyright © 2019-2020 by chocolateboy.\n\nThis is free software; you can redistribute it and/or modify it under the\nterms of the [Artistic License 2.0](https://www.opensource.org/licenses/artistic-license-2.0.php).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchocolateboy%2Fasync-any","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchocolateboy%2Fasync-any","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchocolateboy%2Fasync-any/lists"}