{"id":20292979,"url":"https://github.com/gemini-testing/q-promise-utils","last_synced_at":"2026-06-05T04:31:22.337Z","repository":{"id":57332179,"uuid":"47359958","full_name":"gemini-testing/q-promise-utils","owner":"gemini-testing","description":"Several promise helpers simplifying interaction with multiple async operations","archived":false,"fork":false,"pushed_at":"2019-11-06T22:03:46.000Z","size":9,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T12:18:18.784Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gemini-testing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-03T20:57:13.000Z","updated_at":"2016-03-14T14:05:17.000Z","dependencies_parsed_at":"2022-09-21T03:51:58.113Z","dependency_job_id":null,"html_url":"https://github.com/gemini-testing/q-promise-utils","commit_stats":null,"previous_names":["swinx/q-promise-utils"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fq-promise-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fq-promise-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fq-promise-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fq-promise-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gemini-testing","download_url":"https://codeload.github.com/gemini-testing/q-promise-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787485,"owners_count":20020101,"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-14T15:20:25.447Z","updated_at":"2026-06-05T04:31:22.269Z","avatar_url":"https://github.com/gemini-testing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# q-promise-utils\n\nSeveral utils for simpifying interaction with multiple async operations.\n\n## API\n\n### utils.sequence(funcs, [args])\n\nExecutes `funcs` in async manner one by one.\nArguments:\n* funcs - functions to execute\n* args (optional) - arguments to pass to each function\n\nExample:\n\n```js\nvar foo = function() {},\n    bar = function() {};\n\nutils.sequence([foo, bar], 'some-string', 100500)\n    .then(function() {\n        // first executed `foo('some-string', 100500)`,\n        // then `bar('some-string', 100500)`,\n        // then arrives to this code block\n    });\n```\n\n### utils.seqMap(items, callback)\n\nSerially applies `callback` to each item in `items` array in async manner\n\nExample:\n\n```js\nvar items = ['foo', 'bar'],\n    callback = function() {};\n\nutils.seqMap(items, callback)\n    .then(function() {\n        //first runs `callback` with arg `foo`, then with arg `bar`, next arrives to this code block\n    });\n```\n\n##utils.waitForResults(promises)\n\nWaits for all promises in array to be resolved or rejected.\nUnlike Q.allSettled, rejects when any of the promises is rejected.\nUnlike Q.all does not immediately rejects a promise on a first error and waits for other operations to complete.\n\nExample:\n\n```js\nvar delay = q.delay(100),\n    rejected = q.reject('whatever');\n\nutils.waitForResults([rejected, delay])\n    .fail(function(reason) {\n        //arrives here after 100ms with reject reason `whatever`\n    });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Fq-promise-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemini-testing%2Fq-promise-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Fq-promise-utils/lists"}