{"id":20109539,"url":"https://github.com/agentcooper/node-worker-threads-map-example","last_synced_at":"2026-05-17T09:35:45.187Z","repository":{"id":141124666,"uuid":"271524049","full_name":"agentcooper/node-worker-threads-map-example","owner":"agentcooper","description":"Example of mapping an array using workers.","archived":false,"fork":false,"pushed_at":"2020-06-11T11:19:45.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-13T05:29:58.530Z","etag":null,"topics":["nodejs","threads","workers"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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-11T11:02:41.000Z","updated_at":"2020-06-11T11:42:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"936e00f6-4498-4f47-8a78-729dc4e54bbc","html_url":"https://github.com/agentcooper/node-worker-threads-map-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentcooper%2Fnode-worker-threads-map-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentcooper%2Fnode-worker-threads-map-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentcooper%2Fnode-worker-threads-map-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentcooper%2Fnode-worker-threads-map-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentcooper","download_url":"https://codeload.github.com/agentcooper/node-worker-threads-map-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241549741,"owners_count":19980578,"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":["nodejs","threads","workers"],"created_at":"2024-11-13T18:08:47.225Z","updated_at":"2025-10-27T12:04:58.472Z","avatar_url":"https://github.com/agentcooper.png","language":"JavaScript","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```\n~/node-worker-threads-map-example % node 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: 9488.254ms\n```\n\n```\n~/node-worker-threads-map-example % node 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: 28258.634ms\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentcooper%2Fnode-worker-threads-map-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentcooper%2Fnode-worker-threads-map-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentcooper%2Fnode-worker-threads-map-example/lists"}