{"id":13447080,"url":"https://github.com/samrith-s/concurrent-tasks","last_synced_at":"2025-03-21T17:30:43.247Z","repository":{"id":40240531,"uuid":"159933649","full_name":"samrith-s/concurrent-tasks","owner":"samrith-s","description":"A simple task runner which will run all tasks till completion, while maintaining concurrency limits.","archived":false,"fork":false,"pushed_at":"2024-11-13T06:52:11.000Z","size":1317,"stargazers_count":40,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T16:13:23.131Z","etag":null,"topics":["concurrent-tasks","javascript","priority-queue","task","task-list","task-queue","task-runner","tasks"],"latest_commit_sha":null,"homepage":"https://concurrent-tasks.samrith.dev","language":"TypeScript","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/samrith-s.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-01T10:32:17.000Z","updated_at":"2025-02-20T08:23:51.000Z","dependencies_parsed_at":"2023-11-14T11:31:14.862Z","dependency_job_id":"cce46884-316a-493f-a454-437d185746ab","html_url":"https://github.com/samrith-s/concurrent-tasks","commit_stats":{"total_commits":237,"total_committers":5,"mean_commits":47.4,"dds":0.3966244725738397,"last_synced_commit":"704f9aeaacafa87c7f3ef7dfc8c51b3c2e895cba"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrith-s%2Fconcurrent-tasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrith-s%2Fconcurrent-tasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrith-s%2Fconcurrent-tasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrith-s%2Fconcurrent-tasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samrith-s","download_url":"https://codeload.github.com/samrith-s/concurrent-tasks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244115020,"owners_count":20400495,"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":["concurrent-tasks","javascript","priority-queue","task","task-list","task-queue","task-runner","tasks"],"created_at":"2024-07-31T05:01:07.659Z","updated_at":"2025-03-21T17:30:43.235Z","avatar_url":"https://github.com/samrith-s.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/samrith-s/concurrent-tasks/main/docs/public/logo.svg\" alt=\"Concurrent Tasks logo\" height=\"64\"  /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eConcurrent Tasks\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/concurrent-tasks\" style=\"text-decoration:none\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/concurrent-tasks.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/concurrent-tasks\" style=\"text-decoration:none\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dw/concurrent-tasks.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=concurrent-tasks\" style=\"text-decoration:none\"\u003e\n    \u003cimg src=\"https://badgen.net/bundlephobia/minzip/concurrent-tasks\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/samrith-s/concurrent-tasks/stargazers\" style=\"text-decoration:none\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/samrith-s/concurrent-tasks.svg?label=Stars\u0026style=social\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nA simple task runner which will run all tasks till completion, while maintaining concurrency limits.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nRead the full documentation at the \u003ca href=\"https://concurrent-tasks.samrith.dev\"\u003ewebsite\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n# Introduction\n\nConcurrent Tasks mimics a queue by using JavaScript's inbuilt array data type. Each task is a function which signals completion back to the runner.\n\nThe minimalism of Concurrent Tasks makes it an easy-to-use solution across any framework or flavour of JavaScript. It has **ZERO dependencies** and can be used virtually in any scenario. With a **minified and gzipped size of 2.7kB**, it is the ultimate lightweight tool for your concurrency needs.\n\n- [x] Vanilla JavaScript\n- [x] Frontend Frameworks (React, Vue, Angular, etc)\n- [x] Backend Frameworks (Express, Hapi, Koa, etc)\n- [x] NPM Module\n- [x] Node CLI Application\n\n# Installation\n\n### Node\n\n```bash\n# NPM\nnpm i concurrent-tasks\n\n# Yarn\nyarn add concurrent-tasks\n\n# PNPM\npnpm i concurrent-tasks\n```\n\n### Browser\n\n```html\n\u003cscript\n  src=\"https://cdn.jsdelivr.net/npm/concurrent-tasks/umd/concurrent-tasks.min.js\"\n  type=\"text/javascript\"\n\u003e\u003c/script\u003e\n```\n\n### Bun\n\n```bash\nbun install concurrent-tasks\n```\n\n### Deno\n\n```ts\nimport { TaskRunner } from \"https://cdn.jsdelivr.net/npm/concurrent-tasks/src/index.ts\";\n```\n\n# Usage\n\n\u003e **Important:** Each task passed to the task runner, necessarily has to call the done function. If not, your queue won't process properly.\n\n```typescript\nimport TaskRunner from \"concurrent-tasks\";\n\nconst runner = new TaskRunner();\n\nfunction generateTasks() {\n  const tasks = [];\n  let count = 1000;\n  while (count) {\n    tasks.push((done) =\u003e {\n      setTimeout(() =\u003e {\n        done();\n      }, Math.random() * 1000);\n    });\n    count--;\n  }\n  return tasks;\n}\n\nrunner.addMultiple(generateTasks());\n\nrunner.start();\n```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrith-s%2Fconcurrent-tasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamrith-s%2Fconcurrent-tasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrith-s%2Fconcurrent-tasks/lists"}