{"id":43494224,"url":"https://github.com/karankraina/nodejs-threads","last_synced_at":"2026-02-03T10:20:31.678Z","repository":{"id":42061595,"uuid":"441937376","full_name":"karankraina/nodejs-threads","owner":"karankraina","description":"A very simple function based implementation of node.js worker threads","archived":false,"fork":false,"pushed_at":"2024-06-01T13:47:28.000Z","size":291,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T03:56:13.685Z","etag":null,"topics":["clustering","nodejs","npm","threads","worker-threads"],"latest_commit_sha":null,"homepage":"","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/karankraina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-12-26T16:38:24.000Z","updated_at":"2025-09-27T13:55:34.000Z","dependencies_parsed_at":"2023-02-07T17:31:35.051Z","dependency_job_id":null,"html_url":"https://github.com/karankraina/nodejs-threads","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/karankraina/nodejs-threads","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karankraina%2Fnodejs-threads","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karankraina%2Fnodejs-threads/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karankraina%2Fnodejs-threads/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karankraina%2Fnodejs-threads/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karankraina","download_url":"https://codeload.github.com/karankraina/nodejs-threads/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karankraina%2Fnodejs-threads/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29041058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["clustering","nodejs","npm","threads","worker-threads"],"created_at":"2026-02-03T10:20:30.864Z","updated_at":"2026-02-03T10:20:31.673Z","avatar_url":"https://github.com/karankraina.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to nodejs-threads 👋\u003c/h1\u003e\n\u003cp\u003e\n  \u003ca href=\"https://circleci.com/gh/karankraina/nodejs-threads/tree/main.svg?style=svg\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Version\" src=\"https://circleci.com/gh/karankraina/nodejs-threads/tree/main.svg?style=svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/nodejs-threads\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Version\" src=\"https://img.shields.io/npm/v/nodejs-threads.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/karankraina/nodejs-threads#readme\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/karankraina/nodejs-threads/graphs/commit-activity\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/karankraina/nodejs-threads/blob/main/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/github/license/karankraina/nodejs-threads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/karankraina\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Twitter: karankraina\" src=\"https://img.shields.io/twitter/follow/karankraina.svg?style=social\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e A very simple function based implementation of node.js worker threads\n\n### 🏠 [Homepage](https://github.com/karankraina/nodejs-threads#readme)\n\n### ✨ [Demo](https://replit.com/@karankraina/nodejs-threads)\n\n## Install\n\n```sh\nnpm install nodejs-threads\n```\n\n\n## Basic Usage\n\n```javascript\n// No need to create a separate file for the worker thread.\n\nconst { runInWorker } = require('nodejs-threads');\n// OR\nimport { runInWorker } from 'nodejs-threads';\n\n// Assume this is the CPU intensive task\nconst { calculateScore } = './users.service';\n\nasync function main() {\n    try {\n        // Spawn a worker thread like this:\n        // Does not block the main thread\n        const result = await runInWorker('./users.service', 'calculateScore', { name: 'Karan' });\n        console.log('[PRIMARY] : WORKER EXECUTED WITH ...', result);\n    } catch (error) {\n        console.log('[PRIMARY] : ERROR', error);\n    }\n}\n\n```\n\n\n\n## API Guide\n\nFor complete usage guide, refer our [API.md](https://github.com/karankraina/nodejs-threads/blob/main/API.md) file\n\n## Run tests\n\n```sh\nnpm run test\n```\n\n## Author\n\n👤 **Karan Raina \u003ckaranraina1996@gmail.com\u003e**\n\n* Website: https://karanraina.tech/\n* Twitter: [@karankraina](https://twitter.com/karankraina)\n* Github: [@karankraina](https://github.com/karankraina)\n* LinkedIn: [@karankraina](https://linkedin.com/in/karankraina)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/karankraina/nodejs-threads/issues). You can also take a look at the [contributing guide](https://github.com/karankraina/nodejs-threads/blob/main/CONTRIBUTING.md).\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 📝 License\n\nCopyright © 2021 [Karan Raina \u003ckaranraina1996@gmail.com\u003e](https://github.com/karankraina).\u003cbr /\u003e\nThis project is [MIT](https://github.com/karankraina/nodejs-threads/blob/main/LICENSE) licensed.\n\n***\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarankraina%2Fnodejs-threads","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarankraina%2Fnodejs-threads","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarankraina%2Fnodejs-threads/lists"}