{"id":17766613,"url":"https://github.com/floatdrop/each-done","last_synced_at":"2025-07-18T08:36:33.633Z","repository":{"id":22189694,"uuid":"25521858","full_name":"floatdrop/each-done","owner":"floatdrop","description":"each-async + async-done = each-done","archived":false,"fork":false,"pushed_at":"2014-10-21T13:21:00.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T23:36:29.071Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floatdrop.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-21T12:48:20.000Z","updated_at":"2025-06-24T10:51:46.000Z","dependencies_parsed_at":"2022-07-17T02:46:12.909Z","dependency_job_id":null,"html_url":"https://github.com/floatdrop/each-done","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/floatdrop/each-done","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Feach-done","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Feach-done/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Feach-done/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Feach-done/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatdrop","download_url":"https://codeload.github.com/floatdrop/each-done/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Feach-done/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265728952,"owners_count":23818733,"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":[],"created_at":"2024-10-26T20:33:23.875Z","updated_at":"2025-07-18T08:36:33.601Z","avatar_url":"https://github.com/floatdrop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# each-done [![Build Status](https://travis-ci.org/floatdrop/each-done.svg?branch=master)](https://travis-ci.org/floatdrop/each-done)\n\n\u003e Async concurrent iterator (async forEach)\n\nInspired by [eachAsync()](https://github.com/sindresorhus/each-async), but with [async-done](https://github.com/phated/async-done) inside.\n\n## Install\n\n```sh\n$ npm install --save each-done\n```\n\n\n## Usage\n\n```js\nvar each = require('each-done');\n\neach(['foo','bar','baz'], function (item, index, done) {\n\tconsole.log(item, index);\n\tdone();\n}, function (error) {\n\tconsole.log('finished');\n});\n//=\u003e foo 0\n//=\u003e bar 1\n//=\u003e baz 2\n//=\u003e finished\n```\n\n\n## API\n\n### eachAsync(array, callback, finishedCallback)\n\n#### array\n\nThe array you want to iterate.\n\n#### callback(item, index, done)\n\nA function which is called for each item in the array with the following arguments:\n\n- `item`: the current item in the array\n- `index`: the current index\n- `done([error])`: call this when you're done with an optional error. Supplying anything other than `undefined`/`null` will stop the iteration.\n\nNote that order is not guaranteed since each item is handled concurrently.\n\nYou can return Promise or Stream from callback function instead of calling `done` argument - then callback will be reloved as soon as Stream emits `end` or Promise will be resolved.\n\n#### finishedCallback(error)\n\nA function which is called when the iteration is finished or on the first error. First argument is the error passed from `done()` in the `callback`.\n\n## License\n\nMIT © [Vsevolod Strukchinsky](floatdrop@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Feach-done","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatdrop%2Feach-done","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Feach-done/lists"}