{"id":19873973,"url":"https://github.com/metarhia/do","last_synced_at":"2025-05-02T10:30:44.715Z","repository":{"id":6678443,"uuid":"7923397","full_name":"metarhia/do","owner":"metarhia","description":"Simplest way to manage asynchronicity","archived":false,"fork":false,"pushed_at":"2024-02-03T22:19:07.000Z","size":378,"stargazers_count":44,"open_issues_count":8,"forks_count":6,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-07T00:51:29.693Z","etag":null,"topics":["async","asynchronous","await","callback","chain","collector","composition","highload","impress","javascript","js","metarhia","node","nodejs","parallel","promise","promisify","series","synchronous","thenable"],"latest_commit_sha":null,"homepage":"https://metarhia.com","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/metarhia.png","metadata":{"files":{"readme":"README.md","changelog":"history.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"patreon":"tshemsedinov"}},"created_at":"2013-01-30T20:44:21.000Z","updated_at":"2025-03-21T19:23:27.000Z","dependencies_parsed_at":"2024-02-03T23:23:26.246Z","dependency_job_id":"a8c25c16-439b-48ca-84f6-43d83a6d086a","html_url":"https://github.com/metarhia/do","commit_stats":{"total_commits":127,"total_committers":8,"mean_commits":15.875,"dds":"0.40944881889763785","last_synced_commit":"c4b69e30390fffc42a85d264d10308e08e4fd1df"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metarhia%2Fdo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metarhia%2Fdo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metarhia%2Fdo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metarhia%2Fdo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metarhia","download_url":"https://codeload.github.com/metarhia/do/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252023148,"owners_count":21682137,"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","asynchronous","await","callback","chain","collector","composition","highload","impress","javascript","js","metarhia","node","nodejs","parallel","promise","promisify","series","synchronous","thenable"],"created_at":"2024-11-12T16:20:45.309Z","updated_at":"2025-05-02T10:30:44.359Z","avatar_url":"https://github.com/metarhia.png","language":"JavaScript","funding_links":["https://patreon.com/tshemsedinov"],"categories":[],"sub_categories":[],"readme":"## \"do\" is the simplest way to manage asynchronicity\n\n[![CI Status](https://github.com/metarhia/do/workflows/Testing%20CI/badge.svg)](https://github.com/metarhia/do/actions?query=workflow%3A%22Testing+CI%22+branch%3Amaster)\n[![NPM Version](https://badge.fury.io/js/do.svg)](https://badge.fury.io/js/do)\n[![NPM Downloads/Month](https://img.shields.io/npm/dm/do.svg)](https://www.npmjs.com/package/do)\n[![NPM Downloads](https://img.shields.io/npm/dt/do.svg)](https://www.npmjs.com/package/do)\n\nIf you don't want to use all the async/chain libraries but just want a reliable way to know when the function is done - this is for you.\n\n## Installation\n\n`npm i do`\n\n## Usage\n\nSeries async execution\n\n```js\nconst chain = require('do');\n\nconst c1 = chain\n  .do(readConfig, 'myConfig')\n  .do(selectFromDb, 'select * from cities')\n  .do(getHttpPage, 'http://kpi.ua')\n  .do(readFile, 'README.md');\n\nc1((err, result) =\u003e {\n  console.log('done');\n  if (err) console.log(err);\n  else console.dir({ result });\n});\n```\n\nData collector\n\n```js\nconst chain = require('do');\nconst fs = require('fs');\n\nconst dc = chain.do(6);\n\ndc('user', null, { name: 'Marcus Aurelius' });\nfs.readFile('HISTORY.md', (err, data) =\u003e dc.collect('history', err, data));\nfs.readFile('README.md', dc.callback('readme'));\nfs.readFile('README.md', dc('readme'));\ndc.take('readme', fs.readFile, 'README.md');\nsetTimeout(() =\u003e dc.pick('timer', { date: new Date() }), 1000);\n```\n\n## Run tests\n\n`npm test`\n\n## License \u0026 Contributors\n\nCopyright (c) 2013-2023 do contributors.\nSee github for full [contributors list](https://github.com/metarhia/do/graphs/contributors).\nDo is [MIT licensed](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetarhia%2Fdo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetarhia%2Fdo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetarhia%2Fdo/lists"}