{"id":13548446,"url":"https://github.com/gulpjs/async-done","last_synced_at":"2026-04-01T20:43:59.128Z","repository":{"id":14298782,"uuid":"17007320","full_name":"gulpjs/async-done","owner":"gulpjs","description":"Allows libraries to handle various caller provided asynchronous functions uniformly. Maps promises, observables, child processes and streams, and callbacks to callback style.","archived":false,"fork":false,"pushed_at":"2023-04-15T22:05:06.000Z","size":76,"stargazers_count":70,"open_issues_count":0,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-03-24T02:00:01.995Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/gulpjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":["gulpjs","phated","yocontra"],"tidelift":"npm/gulp","open_collective":"gulpjs"}},"created_at":"2014-02-20T02:49:58.000Z","updated_at":"2026-01-23T09:09:15.000Z","dependencies_parsed_at":"2023-11-23T06:38:01.394Z","dependency_job_id":null,"html_url":"https://github.com/gulpjs/async-done","commit_stats":{"total_commits":76,"total_committers":13,"mean_commits":5.846153846153846,"dds":"0.21052631578947367","last_synced_commit":"4a7efae92c90ae6358412f2dc759561f0cb94ccc"},"previous_names":["phated/async-done"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/gulpjs/async-done","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fasync-done","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fasync-done/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fasync-done/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fasync-done/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gulpjs","download_url":"https://codeload.github.com/gulpjs/async-done/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fasync-done/sbom","scorecard":{"id":449146,"data":{"date":"2025-08-11","repo":{"name":"github.com/gulpjs/async-done","commit":"4a7efae92c90ae6358412f2dc759561f0cb94ccc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dev.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/async-done/dev.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dev.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/async-done/dev.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dev.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/async-done/dev.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dev.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/async-done/dev.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dev.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/async-done/dev.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dev.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/async-done/dev.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/async-done/release.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/dev.yml:51","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"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":"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":"Code-Review","score":3,"reason":"Found 9/29 approved changesets -- score normalized to 3","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/dev.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/gulpjs/.github/SECURITY.md:1","Info: Found linked content: github.com/gulpjs/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/gulpjs/.github/SECURITY.md:1","Info: Found text in security policy: github.com/gulpjs/.github/SECURITY.md:1"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 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"}}]},"last_synced_at":"2025-08-19T07:42:02.647Z","repository_id":14298782,"created_at":"2025-08-19T07:42:02.647Z","updated_at":"2025-08-19T07:42:02.647Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31217900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-30T15:24:02.938Z","status":"online","status_checked_at":"2026-03-31T02:00:06.327Z","response_time":111,"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":[],"created_at":"2024-08-01T12:01:10.482Z","updated_at":"2026-04-01T20:43:59.095Z","avatar_url":"https://github.com/gulpjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/gulpjs","https://github.com/sponsors/phated","https://github.com/sponsors/yocontra","https://tidelift.com/funding/github/npm/gulp","https://opencollective.com/gulpjs"],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://gulpjs.com\"\u003e\n    \u003cimg height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# async-done\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nAllows libraries to handle various caller provided asynchronous functions uniformly. Maps promises, observables, child processes and streams, and callbacks to callback style.\n\nAs async conventions evolve, it is useful to be able to deal with several different _styles_ of async completion uniformly. With this module you can handle completion using a node-style callback, regardless of a return value that's a promise, observable, child process or stream.\n\n## Usage\n\n### Successful completion\n\n```js\nvar asyncDone = require('async-done');\n\nasyncDone(\n  function (done) {\n    // do async things\n    done(null, 2);\n  },\n  function (error, result) {\n    // `error` will be null on successful execution of the first function.\n    // `result` will be the result from the first function.\n  }\n);\n```\n\n### Failed completion\n\n```js\nvar asyncDone = require('async-done');\n\nasyncDone(\n  function (done) {\n    // do async things\n    done(new Error('Some Error Occurred'));\n  },\n  function (error, result) {\n    // `error` will be an error from the first function.\n    // `result` will be undefined on failed execution of the first function.\n  }\n);\n```\n\n## API\n\n### `asyncDone(fn, callback)`\n\nTakes a function to execute (`fn`) and a function to call on completion (`callback`).\n\n#### `fn([done])`\n\nOptionally takes a callback to call when async tasks are complete.\n\n#### Completion and Error Resolution\n\n- `Callback` (`done`) called\n  - Completion: called with null error\n  - Error: called with non-null error\n- `Stream` or `EventEmitter` returned\n  - Completion: [end-of-stream][end-of-stream] module\n  - Error: [domains][domains]\n  - **Note:** Only actual streams are supported, not faux-streams; Therefore, modules like [`event-stream`][event-stream] are not supported.\n- `Child Process` returned\n  - Completion [end-of-stream][end-of-stream] module\n  - Error: [domains][domains]\n- `Promise` returned\n  - Completion: [onFulfilled][promise-onfulfilled] method called\n  - Error: [onRejected][promise-onrejected] method called\n- `Observable` (e.g. from [RxJS v5][rxjs5-observable] or [RxJS v4][rxjs4-observable]) returned\n  - Completion: [complete][rxjs5-observer-complete] method called\n  - Error: [error][rxjs5-observer-error] method called\n\n**Warning:** Sync tasks are **not supported** and your function will never complete if the one of the above strategies is not used to signal completion. However, thrown errors will be caught by the domain.\n\n#### `callback(error, result)`\n\nIf an error doesn't occur in the execution of the `fn` function, the `callback` method will receive the results as its second argument. Note: Some streams don't received any results.\n\nIf an error occurred in the execution of the `fn` function, The `callback` method will receive an error as its first argument.\n\nErrors can be caused by:\n\n- A thrown error\n- An error passed to a `done` callback\n- An `error` event emitted on a returned `Stream`, `EventEmitter` or `Child Process`\n- A rejection of a returned `Promise` - If the `Promise` is not rejected with a value, we generate a new `Error`\n- The `onError` handler being called on an `Observable`\n\n## License\n\nMIT\n\n\u003c!-- prettier-ignore-start --\u003e\n[downloads-image]: https://img.shields.io/npm/dm/async-done.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/async-done\n[npm-image]: https://img.shields.io/npm/v/async-done.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/async-done/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/actions/workflow/status/gulpjs/async-done/dev.yml?branch=master\u0026style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/async-done\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/async-done/master.svg?style=flat-square\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n[end-of-stream]: https://www.npmjs.com/package/end-of-stream\n[domains]: http://nodejs.org/api/domain.html\n[event-stream]: https://github.com/dominictarr/event-stream\n[promise-onfulfilled]: http://promisesaplus.com/#point-26\n[promise-onrejected]: http://promisesaplus.com/#point-30\n[rxjs4-observable]: https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md\n[rxjs5-observable]: http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html\n[rxjs5-observer-complete]: http://reactivex.io/rxjs/class/es6/MiscJSDoc.js~ObserverDoc.html#instance-method-complete\n[rxjs5-observer-error]: http://reactivex.io/rxjs/class/es6/MiscJSDoc.js~ObserverDoc.html#instance-method-error\n\u003c!-- prettier-ignore-end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgulpjs%2Fasync-done","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgulpjs%2Fasync-done","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgulpjs%2Fasync-done/lists"}