{"id":20109523,"url":"https://github.com/agentcooper/typescript-node-worker-threads-map-example","last_synced_at":"2026-05-28T23:31:28.940Z","repository":{"id":141124681,"uuid":"271585081","full_name":"agentcooper/typescript-node-worker-threads-map-example","owner":"agentcooper","description":"Example of mapping an array using workers.","archived":false,"fork":false,"pushed_at":"2020-06-11T15:42:53.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T18:28:43.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/agentcooper.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}},"created_at":"2020-06-11T15:42:36.000Z","updated_at":"2020-06-11T15:42:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"969f6ee6-9860-4691-addb-61b8ce1aca22","html_url":"https://github.com/agentcooper/typescript-node-worker-threads-map-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agentcooper/typescript-node-worker-threads-map-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentcooper%2Ftypescript-node-worker-threads-map-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentcooper%2Ftypescript-node-worker-threads-map-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentcooper%2Ftypescript-node-worker-threads-map-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentcooper%2Ftypescript-node-worker-threads-map-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentcooper","download_url":"https://codeload.github.com/agentcooper/typescript-node-worker-threads-map-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentcooper%2Ftypescript-node-worker-threads-map-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33630999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-13T18:08:42.775Z","updated_at":"2026-05-28T23:31:28.914Z","avatar_url":"https://github.com/agentcooper.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Example of mapping an array using [workers](https://nodejs.org/api/worker_threads.html).\n\nTo run make sure you're using Node version \u003e=12.\n\n## Install\n\n```\nnpm install\nnpm run build\n```\n\n## Run\n\n```\n~/typescript-node-worker-threads-map-example % node ./build/index.js\n[\n   2,  4,  6,  8, 10,  12, 14, 16, 18, 20, 22,\n  24, 26, 28, 30, 32,  34, 36, 38, 40, 42, 44,\n  46, 48, 50, 52, 54,  56, 58, 60, 62, 64, 66,\n  68, 70, 72, 74, 76,  78, 80, 82, 84, 86, 88,\n  90, 92, 94, 96, 98, 100\n]\nComputation: 11256.496ms\n```\n\n```\n~/typescript-node-worker-threads-map-example % node ./build/index-without-workers.js\n[\n   2,  4,  6,  8, 10,  12, 14, 16, 18, 20, 22,\n  24, 26, 28, 30, 32,  34, 36, 38, 40, 42, 44,\n  46, 48, 50, 52, 54,  56, 58, 60, 62, 64, 66,\n  68, 70, 72, 74, 76,  78, 80, 82, 84, 86, 88,\n  90, 92, 94, 96, 98, 100\n]\nComputation: 27433.186ms\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentcooper%2Ftypescript-node-worker-threads-map-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentcooper%2Ftypescript-node-worker-threads-map-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentcooper%2Ftypescript-node-worker-threads-map-example/lists"}