{"id":14384935,"url":"https://github.com/jgornick/asyncp","last_synced_at":"2026-01-22T06:28:04.408Z","repository":{"id":29028886,"uuid":"32556228","full_name":"jgornick/asyncp","owner":"jgornick","description":"Port of the async library to use Promises.","archived":false,"fork":false,"pushed_at":"2016-10-13T19:12:01.000Z","size":222,"stargazers_count":28,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-26T17:14:16.780Z","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/jgornick.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}},"created_at":"2015-03-20T01:42:10.000Z","updated_at":"2025-04-19T22:48:50.000Z","dependencies_parsed_at":"2022-09-06T04:12:11.877Z","dependency_job_id":null,"html_url":"https://github.com/jgornick/asyncp","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/jgornick/asyncp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgornick%2Fasyncp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgornick%2Fasyncp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgornick%2Fasyncp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgornick%2Fasyncp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgornick","download_url":"https://codeload.github.com/jgornick/asyncp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgornick%2Fasyncp/sbom","scorecard":{"id":518217,"data":{"date":"2025-08-11","repo":{"name":"github.com/jgornick/asyncp","commit":"60fa3964443135784ed2b6848ec687bdd8d5715e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"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":"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":"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":"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":"Code-Review","score":1,"reason":"Found 1/8 approved changesets -- score normalized to 1","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":"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":"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":"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":"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: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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 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-20T02:19:10.488Z","repository_id":29028886,"created_at":"2025-08-20T02:19:10.488Z","updated_at":"2025-08-20T02:19:10.488Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28656841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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-28T18:01:47.568Z","updated_at":"2026-01-22T06:28:04.392Z","avatar_url":"https://github.com/jgornick.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Libraries"],"sub_categories":["[Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)"],"readme":"# asyncp\n\n[![Travis CI Build Status](https://travis-ci.org/jgornick/asyncp.svg?branch=master)](https://travis-ci.org/jgornick/asyncp) [![Coverage Status](https://coveralls.io/repos/github/jgornick/asyncp/badge.svg?branch=master)](https://coveralls.io/github/jgornick/asyncp?branch=master) [![npm version](https://badge.fury.io/js/asyncp.svg)](https://badge.fury.io/js/asyncp) [![Dependency Status](https://david-dm.org/jgornick/asyncp.svg)](https://david-dm.org/jgornick/asyncp) [![Join the chat at https://gitter.im/jgornick/asyncp](https://badges.gitter.im/jgornick/asyncp.svg)](https://gitter.im/jgornick/asyncp)\n\nasyncp is a port of the [async](https://github.com/caolan/async) library to use [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) instead of [Node.js callbacks](http://nodeguide.com/style.html#callbacks).\n\n## Installation\n\n```bash\nnpm install asyncp\n```\n\nYou could also download an archive (zip or tar.gz) from the [asyncp Github Releases](https://github.com/jgornick/asyncp/releases).\n\n## Node.js \u0026 Browser\n\nCurrently, asyncp has been tested against Node.js 4.x and 6.x. asyncp is written in ES2015, but transpiled to ES5 using [Babel](http://babeljs.io/). The distributed npm package contains only ES5 source code.\n\n\u003e TODO: The npm package is also distributed with a single complete file of asyncp and a single minified file of asyncp. The complete files are located in `asyncp/dist/asyncp{.min}.js`.\n\nAnother benefit of asyncp is that it uses the native Promise implementation. This means you can use the native implementation or another library that implements/shims the [Promise/A+](https://promisesaplus.com/) specification (e.g. [When.js](https://github.com/cujojs/when), [Bluebird](https://github.com/petkaantonov/bluebird/), [Q](https://github.com/kriskowal/q)).\n\n## Usage\n\n```js\nconst async = require('asyncp');\nconst p = async.map([1, 2, 3], value =\u003e {\n    switch (value) {\n        // delayed promise\n        case 1:\n            return new Promise(resolve =\u003e setTimeout(resolve.bind(null, value), 25));\n        // sync promise\n        case 2:\n            return new Promise(resolve =\u003e resolve(value));\n        // sync return\n        case 3:\n            return value;\n    }\n});\n\np.then(console.log); // [1, 2, 3];\n```\n\nOr, you can require/import individual functions:\n\n```js\nconst map = require('asyncp/map');\nconst p = map([1, 2, 3], value =\u003e {\n    switch (value) {\n        // delayed promise\n        case 1:\n            return new Promise(resolve =\u003e setTimeout(resolve.bind(null, value), 25));\n        // sync promise\n        case 2:\n            return new Promise(resolve =\u003e resolve(value));\n        // sync return\n        case 3:\n            return value;\n    }\n});\n\np.then(console.log); // [1, 2, 3];\n```\n\n## Documentation\n\nAPI documentation is coming soon, but...\n\nBecause this is a port of the [async](https://github.com/caolan/async) library, the API _should_ be the same. Existing async documentation can be found [here](http://caolan.github.io/async/). The biggest difference is that there won't be a final callback argument. Instead of the callback, the resolved Promise is equivalent.\n\nAnother difference is when an async iteratee, task, callback, etc... could allow multiple result arguments, they will be represented as an array of results in the resolved Promise. This concept is similar to [Bluebird.spread](http://bluebirdjs.com/docs/api/spread.html).\n\n## Missing Implementations\n\nThe following functions in [async](https://github.com/caolan/async) are missing from asyncp. Some of the functions are not all that useful when working with Promises, but contributions are welcome!\n\n### Control Flow\n\n* [```auto```](http://caolan.github.io/async/docs.html#.auto)\n* [```autoInject```](http://caolan.github.io/async/docs.html#.autoInject)\n* [```cargo```](http://caolan.github.io/async/docs.html#.cargo)\n* [```priorityQueue```](http://caolan.github.io/async/docs.html#.priorityQueue)\n* [```race```](http://caolan.github.io/async/docs.html#.race) =\u003e Use [Promise.race](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race).\n* [```queue```](http://caolan.github.io/async/docs.html#.queue)\n\n### Utils\n\n* [```apply```](http://caolan.github.io/async/docs.html#.apply) =\u003e Use [function.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n* [```asyncify```](http://caolan.github.io/async/docs.html#.asyncify)\n* [```constant```](http://caolan.github.io/async/docs.html#.constant) =\u003e Use [lodash#constant](https://lodash.com/docs#constant).\n* [```dir```](http://caolan.github.io/async/docs.html#.dir)\n* [```ensureAsync```](http://caolan.github.io/async/docs.html#.ensureAsync)\n* [```log```](http://caolan.github.io/async/docs.html#.log)\n* [```memoize```](http://caolan.github.io/async/docs.html#.memoize) =\u003e Use [lodash#memoize](https://lodash.com/docs#memoize)\n* [```nextTick```](http://caolan.github.io/async/docs.html#.nextTick)\n* [```reflectAll```](http://caolan.github.io/async/docs.html#.reflectAll)\n* [```reflect```](http://caolan.github.io/async/docs.html#.reflect)\n* [```setImmediate```](http://caolan.github.io/async/docs.html#.setImmediate)\n* [```unmemoize```](http://caolan.github.io/async/docs.html#.unmemoize)\n\n## \"Gotchas\"\n\n* When using collection functions (`each`, `eachOf`, `detect`, etc...), the `collection` passed into the `iteratee` is a *reference*. This means that for each iteration, it's possible to modify the source collection. It's recommended to use the the `collection` as a read-only reference. This is especially important with `*Series` and `*Limit` methods as the `iteratee` is *not* called in the same tick as the original function call.\n\n## Credits\n\nMuch thanks to [Brian Cavalier](https://github.com/briancavalier) and others in the #cujojs room on freenode!\n\nAlso, thanks for [David Bushong](https://github.com/dbushong) for inspiration from his [async-q](https://github.com/dbushong/async-q) library.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgornick%2Fasyncp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgornick%2Fasyncp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgornick%2Fasyncp/lists"}