{"id":13565428,"url":"https://github.com/feross/run-parallel","last_synced_at":"2025-04-13T22:30:50.743Z","repository":{"id":15958042,"uuid":"18700638","full_name":"feross/run-parallel","owner":"feross","description":"Run an array of functions in parallel","archived":false,"fork":false,"pushed_at":"2023-02-27T23:50:37.000Z","size":49,"stargazers_count":380,"open_issues_count":1,"forks_count":16,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-29T21:02:08.049Z","etag":null,"topics":["async","browser","javascript","nodejs","parallel"],"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/feross.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}},"created_at":"2014-04-12T09:24:31.000Z","updated_at":"2024-09-25T09:09:33.000Z","dependencies_parsed_at":"2022-08-26T16:30:45.307Z","dependency_job_id":"521b5cae-72d3-417f-89e8-408c48ec5899","html_url":"https://github.com/feross/run-parallel","commit_stats":{"total_commits":81,"total_committers":5,"mean_commits":16.2,"dds":"0.14814814814814814","last_synced_commit":"847143890416d90ec41eb8df7c8f7ae6a9d66183"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Frun-parallel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Frun-parallel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Frun-parallel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Frun-parallel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feross","download_url":"https://codeload.github.com/feross/run-parallel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261594,"owners_count":20910108,"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":["async","browser","javascript","nodejs","parallel"],"created_at":"2024-08-01T13:01:46.774Z","updated_at":"2025-04-06T19:09:22.296Z","avatar_url":"https://github.com/feross.png","language":"JavaScript","readme":"# run-parallel [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[ci-image]: https://img.shields.io/github/workflow/status/feross/run-parallel/ci/master\n[ci-url]: https://github.com/feross/run-parallel/actions\n[npm-image]: https://img.shields.io/npm/v/run-parallel.svg\n[npm-url]: https://npmjs.org/package/run-parallel\n[downloads-image]: https://img.shields.io/npm/dm/run-parallel.svg\n[downloads-url]: https://npmjs.org/package/run-parallel\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n### Run an array of functions in parallel\n\n![parallel](https://raw.githubusercontent.com/feross/run-parallel/master/img.png) [![Sauce Test Status](https://saucelabs.com/browser-matrix/run-parallel.svg)](https://saucelabs.com/u/run-parallel)\n\n### install\n\n```\nnpm install run-parallel\n```\n\n### usage\n\n#### parallel(tasks, [callback])\n\nRun the `tasks` array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its callback, the main\n`callback` is immediately called with the value of the error. Once the `tasks` have\ncompleted, the results are passed to the final `callback` as an array.\n\nIt is also possible to use an object instead of an array. Each property will be run as a\nfunction and the results will be passed to the final `callback` as an object instead of\nan array. This can be a more readable way of handling the results.\n\n##### arguments\n\n- `tasks` - An array or object containing functions to run. Each function is passed a\n`callback(err, result)` which it must call on completion with an error `err` (which can\nbe `null`) and an optional `result` value.\n- `callback(err, results)` - An optional callback to run once all the functions have\ncompleted. This function gets a results array (or object) containing all the result\narguments passed to the task callbacks.\n\n##### example\n\n```js\nvar parallel = require('run-parallel')\n\nparallel([\n  function (callback) {\n    setTimeout(function () {\n      callback(null, 'one')\n    }, 200)\n  },\n  function (callback) {\n    setTimeout(function () {\n      callback(null, 'two')\n    }, 100)\n  }\n],\n// optional callback\nfunction (err, results) {\n  // the results array will equal ['one','two'] even though\n  // the second function had a shorter timeout.\n})\n```\n\nThis module is basically equavalent to\n[`async.parallel`](https://github.com/caolan/async#paralleltasks-callback), but it's\nhandy to just have the one function you need instead of the kitchen sink. Modularity!\nEspecially handy if you're serving to the browser and need to reduce your javascript\nbundle size.\n\nWorks great in the browser with [browserify](http://browserify.org/)!\n\n### see also\n\n- [run-auto](https://github.com/feross/run-auto)\n- [run-parallel-limit](https://github.com/feross/run-parallel-limit)\n- [run-series](https://github.com/feross/run-series)\n- [run-waterfall](https://github.com/feross/run-waterfall)\n\n### license\n\nMIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Frun-parallel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeross%2Frun-parallel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Frun-parallel/lists"}