{"id":27265881,"url":"https://github.com/sgtlambda/worq","last_synced_at":"2025-04-11T08:39:22.593Z","repository":{"id":28039211,"uuid":"31534876","full_name":"sgtlambda/worq","owner":"sgtlambda","description":"Run promises in series or with a configurable concurrency limit","archived":false,"fork":false,"pushed_at":"2016-05-25T09:11:49.000Z","size":81,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T06:11:13.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/sgtlambda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-02T10:19:58.000Z","updated_at":"2016-02-14T19:01:13.000Z","dependencies_parsed_at":"2022-07-31T21:48:01.757Z","dependency_job_id":null,"html_url":"https://github.com/sgtlambda/worq","commit_stats":null,"previous_names":["jmversteeg/worq"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Fworq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Fworq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Fworq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Fworq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgtlambda","download_url":"https://codeload.github.com/sgtlambda/worq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248362223,"owners_count":21091072,"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":"2025-04-11T08:39:22.152Z","updated_at":"2025-04-11T08:39:22.577Z","avatar_url":"https://github.com/sgtlambda.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# worq\n\n\u003e Promising job queue\n\nRun promises in series or with a configurable concurrency limit\n\n[![Build Status][travis-image]][travis-url]\n[![Code Quality][codeclimate-image]][codeclimate-url]\n[![Code Coverage][coveralls-image]][coveralls-url]\n[![NPM Version][npm-image]][npm-url]\n\n## Install\n\n```bash\n$ npm install --save worq\n```\n\n## Usage\n\n```js\nconst Queue = require('worq');\n\nlet queue = new Queue();\n\nqueue.run([\n\n    () =\u003e somePromisingFunction(),\n    () =\u003e someOtherPromisingFunction(),\n    () =\u003e someNormalFunction()\n    \n    // these functions will be executed in series\n    \n]).then(results =\u003e {\n\n    // results will be an array containing the return / fulfillment values\n    \n});\n```\n\n## API\n\n### Queue([options])\n\n#### options\n\n##### concurrency\n\nType: `number`\nDefault: `1`\n\nThe maximum number of jobs that can run simultaneously\n\n### Queue.run(jobs)\n\n#### jobs\n\nType: `Function[]`\n\nAn array of jobs. Jobs may return/throw regularly or return a promise.\n\nReturns a promise for an array containing the fulfillment values in the same order.\n\n### Queue.cancel()\n\nCancels the remaining jobs.\n\n## License\n\nMIT © JM Versteeg\n\n[![dependency Status][david-image]][david-url]\n[![devDependency Status][david-dev-image]][david-dev-url]\n\n[travis-image]: https://img.shields.io/travis/jmversteeg/worq.svg?style=flat-square\n[travis-url]: https://travis-ci.org/jmversteeg/worq\n\n[codeclimate-image]: https://img.shields.io/codeclimate/github/jmversteeg/worq.svg?style=flat-square\n[codeclimate-url]: https://codeclimate.com/github/jmversteeg/worq\n\n[david-image]: https://img.shields.io/david/jmversteeg/worq.svg?style=flat-square\n[david-url]: https://david-dm.org/jmversteeg/worq\n\n[david-dev-image]: https://img.shields.io/david/dev/jmversteeg/worq.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/jmversteeg/worq#info=devDependencies\n\n[coveralls-image]: https://img.shields.io/coveralls/jmversteeg/worq.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/jmversteeg/worq\n\n[npm-image]: https://img.shields.io/npm/v/worq.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/worq\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgtlambda%2Fworq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgtlambda%2Fworq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgtlambda%2Fworq/lists"}