{"id":19273927,"url":"https://github.com/rintoj/chain-async","last_synced_at":"2025-10-15T14:41:21.798Z","repository":{"id":57196624,"uuid":"58025185","full_name":"rintoj/chain-async","owner":"rintoj","description":"JS Util: Helps in executing async operations one after another.","archived":false,"fork":false,"pushed_at":"2016-05-04T12:06:58.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T14:28:32.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","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/rintoj.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":"2016-05-04T05:28:14.000Z","updated_at":"2016-12-24T15:44:59.000Z","dependencies_parsed_at":"2022-09-01T00:52:43.323Z","dependency_job_id":null,"html_url":"https://github.com/rintoj/chain-async","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rintoj%2Fchain-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rintoj%2Fchain-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rintoj%2Fchain-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rintoj%2Fchain-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rintoj","download_url":"https://codeload.github.com/rintoj/chain-async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240378873,"owners_count":19792039,"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-11-09T20:44:30.457Z","updated_at":"2025-10-15T14:41:16.767Z","avatar_url":"https://github.com/rintoj.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# chain-async\n\nHelps in executing async operations one after another.\n\n## Installation\n\nThis module is installed via npm:\n\n```bash\n$ npm install chain-async --save\n```\n\n## Usage\n\n### Import \n  ```js\n  var chainAsync = require('chain-async');\n  ```\n\n### Use 'Series'\n\n  ```js\n  // execute series of async functions with callbacks\n  chainAsync.series([\n      function operation1(callback) {\n          // ... your tasks\n          callback();\n      },\n      function operation2(callback) {\n          // ... your tasks\n          callback();\n      },\n      function operation3(callback) {\n          // ... your tasks\n          callback();\n      },\n  ], function callback(error, response, index) {\n      // finally your results are here\n  });\n  ```\n#### Signature of callback function\n\n```\n    /**\n     * @param error     - be undefined if no error occured otherwise last occured error\n     * @param response  - an array of responses from each operation at the same index as of operation's index\n     * @param index     - previous executed operation's index\n     */\n    function callback(error, response, index) {\n       \n    }\n```\n\n### Use 'Parallel'\n\n  ```js\n  // execute set of functions with callbacks in parallel and know when all done\n  chainAsync.parallel([\n      function operation1(callback) {\n          // ... your tasks\n          callback();\n      },\n      function operation2(callback) {\n          // ... your tasks\n          callback();\n      },\n      function operation3(callback) {\n          // ... your tasks\n          callback();\n      },\n  ], function callback(error, response) {\n      // finally your results are here\n  });\n \n  ```\n\n#### Signature of callback function\n\n```\n    /**\n     * Series operation will be terminated if there is an error.\n     * \n     * @param error     - be undefined if no error occured otherwise last occured error\n     * @param response  - an array of responses from each operation at the same index as of operation's index\n     */\n    function callback(error, response) {\n        \n    }\n```\n\nABOUT\n===\n\n## Running the Tests\nDo `npm install` to install all of the dependencies, ensure that [MongoDB](http://mongodb.org) is installed, then to run the unit tests run:\n\n```\n$ npm test\n```\n\n## Contributing\nContributions are very welcome! Just send a pull request. Feel free to contact me or checkout my [Github](https://github.com/rintoj) page.\n\n## Author\n\n**Rinto Jose** (rintoj) \n\nFollow me:\n  [Github](https://github.com/rintoj)\n| [Facebook](https://www.facebook.com/rinto.jose)\n| [Twitter](https://twitter.com/rintoj)\n| [Google+](https://plus.google.com/+RintoJoseMankudy)\n| [Youtube](https://youtube.com/+RintoJoseMankudy)\n\n## License\n```\nThe MIT License (MIT)\n\nCopyright (c) 2016 Rinto Jose (rintoj)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frintoj%2Fchain-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frintoj%2Fchain-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frintoj%2Fchain-async/lists"}