{"id":25932525,"url":"https://github.com/jaaamesey/parra","last_synced_at":"2026-04-28T01:32:12.676Z","repository":{"id":280291340,"uuid":"941512172","full_name":"jaaamesey/parra","owner":"jaaamesey","description":"a `run-with-worker` wrapper for easy parallel computation in JavaScript ","archived":false,"fork":false,"pushed_at":"2025-05-14T10:15:46.000Z","size":50,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-27T13:48:56.414Z","etag":null,"topics":["javascript","parallelization","web-workers"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jaaamesey.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2025-03-02T13:26:04.000Z","updated_at":"2025-07-13T23:38:48.000Z","dependencies_parsed_at":"2025-03-02T15:25:26.412Z","dependency_job_id":"bc082bb4-3c83-4493-a975-bddad277f189","html_url":"https://github.com/jaaamesey/parra","commit_stats":null,"previous_names":["jaaamesey/parra"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jaaamesey/parra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaaamesey%2Fparra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaaamesey%2Fparra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaaamesey%2Fparra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaaamesey%2Fparra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaaamesey","download_url":"https://codeload.github.com/jaaamesey/parra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaaamesey%2Fparra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32362781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["javascript","parallelization","web-workers"],"created_at":"2025-03-04T00:38:01.950Z","updated_at":"2026-04-28T01:32:12.672Z","avatar_url":"https://github.com/jaaamesey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parra: parallel computations made easy\n\nTo install:\n\n`npm i parra`\n\n*Note: This library is still in a very experimental stage of development. Feel free to report any issues [here](https://github.com/jaaamesey/parra/issues).*\n\nThis library wraps [run-with-worker](https://github.com/jaaamesey/run-with-worker) with Array functions that enable easy, safe, and platform-agnostic parallel computations in JavaScript Web Workers.\n\nIt currently supports:\n1. a parallel `Array.map` equivalent\n2. a parallel `Array.reduce` equivalent\n\nAs with the core run-with-worker package, the amount of overhead Web Workers introduce makes parallelization only useful for computations that would take more than a few milliseconds.\n\n## Examples\n\n```ts\ntest(\"parallelMap: powers of 2\", async () =\u003e {\n  const res = await parallelMap(\n    // number of threads (Workers) to split work between\n    4,\n    // items to process\n    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n    // computation to perform on each item\n    (item, [base]) =\u003e base ** item,\n    // any extra dependencies to send to the workers\n    [2],\n  );\n  expect(res).toEqual([2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]);\n});\n\ntest(\"parallelReduce: sum of numbers\", async () =\u003e {\n  const res = await parallelReduce(\n    4,\n    Array.from({ length: 100 }).map((_, i) =\u003e i + 1),\n    (acc, item) =\u003e acc + item,\n    0,\n    [],\n  );\n  expect(res).toEqual(5050);\n});\n\ntest(\"parallelReduce: product of numbers\", async () =\u003e {\n  const res = await parallelReduce(\n    4,\n    Array.from({ length: 10 }).map((_, i) =\u003e i + 1),\n    (acc, item) =\u003e acc * item,\n    1,\n    [],\n  );\n  expect(res).toEqual(3628800);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaaamesey%2Fparra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaaamesey%2Fparra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaaamesey%2Fparra/lists"}