{"id":29172262,"url":"https://github.com/yabab-dev/promise-utils","last_synced_at":"2025-07-25T14:13:06.725Z","repository":{"id":57101911,"uuid":"81600208","full_name":"yabab-dev/promise-utils","owner":"yabab-dev","description":"Promise useful functions","archived":false,"fork":false,"pushed_at":"2017-03-08T16:31:44.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-27T09:11:36.868Z","etag":null,"topics":["all","progress","promise","props","series"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yabab-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-02-10T19:39:28.000Z","updated_at":"2017-03-08T16:28:38.000Z","dependencies_parsed_at":"2022-08-20T16:20:38.007Z","dependency_job_id":null,"html_url":"https://github.com/yabab-dev/promise-utils","commit_stats":null,"previous_names":["chymz/promise-utils"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yabab-dev/promise-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fpromise-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fpromise-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fpromise-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fpromise-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yabab-dev","download_url":"https://codeload.github.com/yabab-dev/promise-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fpromise-utils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262969875,"owners_count":23392530,"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":["all","progress","promise","props","series"],"created_at":"2025-07-01T13:11:05.511Z","updated_at":"2025-07-25T14:13:06.706Z","avatar_url":"https://github.com/yabab-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PromiseUtils\nSome useful functions for promises\n\n**Install :**\n\n`npm install @chymz/promise-utils`\n\n## Progress callback\nWhen you call `all()`, `props()`, `series()` or `seriesProps()` returned promise\nhave an available `progress()` method to listen progress of promises executions\n\n**Usage :**\n```javascript\nimport PromiseUtils from '@chymz/promise-utils';\n\nPromiseUtils.all([\n  promise(),\n  promise(),\n  promise()\n])\n.progress((current, total) =\u003e {\n  let percent = current / total * 100;\n})\n.then(results =\u003e {\n  // ...\n})\n```\n\n## `props()`\nInstead of using an array with `Promise.all()` you can pass an object to\n`PromiseUtils.props()`\n\n**Usage :**\n```javascript\nimport PromiseUtils from '@chymz/promise-utils';\n\nPromiseUtils.props({\n  one: promise(),\n  two: promise()\n})\n.then(results =\u003e {\n  /*\n  results object is like :\n    {\n      one: 'result of first promise',\n      two: 'result of second promise'\n    }\n  */\n})\n```\n\n## `series()`\n@todo : description (see `tests/index.js`)\n\n## `seriesProps()`\n@todo : description (see `tests/index.js`)\n\n## Override Promise class used by this lib\nIf you don't want to use native Promise class, you can do this :\n\n```javascript\nimport Bluebird from 'bluebird';\nimport PromiseUtils from 'promise-utils';\n\nPromiseUtils.Promise = Bluebird;\n\n// or simply :\n\nglobal.Promise = Bluebird;\n\n```\n\n## Todo\n- Polyfill note for IE11 \u0026 Old browsers\n- `series()` \u0026 `seriesProps()` description/samples\n\n## License\nSee `LICENSE` file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyabab-dev%2Fpromise-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyabab-dev%2Fpromise-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyabab-dev%2Fpromise-utils/lists"}