{"id":22092251,"url":"https://github.com/pirxpilot/run-waterfall-until","last_synced_at":"2025-03-23T23:45:42.528Z","repository":{"id":136536667,"uuid":"160988521","full_name":"pirxpilot/run-waterfall-until","owner":"pirxpilot","description":"Like run-waterfall but tasks can break out of the loop","archived":false,"fork":false,"pushed_at":"2024-02-13T21:07:08.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-03-14T21:45:06.738Z","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/pirxpilot.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-08T23:44:14.000Z","updated_at":"2024-02-13T20:59:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"28c63883-9afd-4592-9165-b16e3fddf8c4","html_url":"https://github.com/pirxpilot/run-waterfall-until","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Frun-waterfall-until","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Frun-waterfall-until/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Frun-waterfall-until/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Frun-waterfall-until/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pirxpilot","download_url":"https://codeload.github.com/pirxpilot/run-waterfall-until/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186928,"owners_count":20574554,"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-12-01T03:08:53.384Z","updated_at":"2025-03-23T23:45:42.509Z","avatar_url":"https://github.com/pirxpilot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version][npm-image]][npm-url]\n[![Build Status][build-image]][build-url]\n[![Dependency Status][deps-image]][deps-url]\n\n# run-waterfall-until\n\nLike [run-waterfall] but tasks can break out of the loop.\n\n## Install\n\n```sh\n$ npm install --save run-waterfall-until\n```\n\n## Usage\n\n`run-waterfal-until` processes the list of tasks one by one, ending processing as soon as one of the tasks says so.\nThe next task is invoked with arguments set by the previous task.\nIt is a cross between async operations: waterfall and some.\n\n```js\nconst waterfallUntil = require('run-waterfall-until');\n\n\nwaterfallUntil([\n  function (arg1, arg2, callback) {\n    // arg1 now equals 'foo', and arg2 - 'bar'\n    // false means continue\n    callback(null, false, 'one', 'two');\n  },\n  function (arg1, arg2, callback) {\n    // arg1 now equals 'one', and arg2 - 'two'\n    // true means break out of the loop\n    callback(null, true, 'three');\n  },\n  function (arg1, callback) {\n    // this function is not called since previous one has called callback with 'true' \n    callback(null, 'done', 'wohoo');\n  }\n], 'foo', 'bar', function (err, result1) {\n   // result1 now equals 'three'\n});\n\n```\n\n## License\n\nMIT © [Damian Krzeminski](https://pirxpilot.me)\n\n[run-waterfall]: https://www.npmjs.com/package/run-waterfall\n\n[npm-image]: https://img.shields.io/npm/v/run-waterfall-until\n[npm-url]: https://npmjs.org/package/run-waterfall-until\n\n[build-url]: https://github.com/pirxpilot/run-waterfall-until/actions/workflows/check.yaml\n[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/run-waterfall-until/check.yaml?branch=main\n\n[deps-image]: https://img.shields.io/librariesio/release/npm/run-waterfall-until\n[deps-url]: https://libraries.io/npm/run-waterfall-until\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Frun-waterfall-until","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpirxpilot%2Frun-waterfall-until","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Frun-waterfall-until/lists"}