{"id":20308632,"url":"https://github.com/joojscript/enginer","last_synced_at":"2025-04-11T15:40:21.142Z","repository":{"id":42001113,"uuid":"393499316","full_name":"joojscript/enginer","owner":"joojscript","description":"An utility js/ts library to make Javacript conccurent!","archived":false,"fork":false,"pushed_at":"2022-04-19T12:52:00.000Z","size":797,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T11:49:20.449Z","etag":null,"topics":[],"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/joojscript.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}},"created_at":"2021-08-06T20:47:45.000Z","updated_at":"2022-04-19T12:47:31.000Z","dependencies_parsed_at":"2022-08-12T02:00:23.764Z","dependency_job_id":null,"html_url":"https://github.com/joojscript/enginer","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/joojscript%2Fenginer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joojscript%2Fenginer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joojscript%2Fenginer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joojscript%2Fenginer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joojscript","download_url":"https://codeload.github.com/joojscript/enginer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322609,"owners_count":21084336,"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":[],"created_at":"2024-11-14T17:23:19.434Z","updated_at":"2025-04-11T15:40:21.106Z","avatar_url":"https://github.com/joojscript.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\r\n  \u003cimg src=\"https://github.com/joojscript/enginer/blob/master/.github/assets/logo.png?raw=true\" height=\"200\" /\u003e \u003cbr /\u003e\r\n  Enginer\r\n\u003c/h1\u003e\r\n\r\nAn utility js/ts library to make Javacript conccurent!\r\n\r\n## Motivation\r\n\r\nWhile trying to make high-scalable and performant systems, I end up being in contact with node.js' **worker_threads** which were trully nice! But unfortunelly, at least in my search, I could not find any implementations that support typescript.\r\n\r\nI end up trying some work arounds, but, as a developer that likes a lot concurrency, I decided to make my own implementation. So here it is! Hope it helps! :)\r\n\r\n## Installation\r\n\r\n```shell\r\nnpm install enginer\r\n```\r\n\r\nor\r\n\r\n```shell\r\nyarn add enginer\r\n```\r\n\r\n⚠ **warning**: Typescript is **not** a required dependecy, as this library works without it. But if your code is in ts, you need to have it installed. \r\n\r\n## Usage\r\n\r\n### Single Worker\r\n\r\n```typescript\r\nconst filepath = resolve(__dirname, \"file.ts\");\r\n\r\nnew Worker({ filepath });\r\n```\r\n\r\n### Worker Pool\r\n\r\n```typescript\r\nconst filepath = resolve(__dirname, \"file.ts\");\r\n\r\nnew Pool({\r\n  max: 4,\r\n  workers: [\r\n    new Worker({ filepath }),\r\n    new Worker({ filepath }),\r\n    new Worker({ filepath }),\r\n    new Worker({ filepath }),\r\n    new Worker({ filepath }),\r\n    new Worker({ filepath }),\r\n    new Worker({ filepath }),\r\n    new Worker({ filepath }),\r\n    new Worker({ filepath }),\r\n  ],\r\n});\r\n```\r\n\r\n## ToDo\r\n\r\n- 🕐 Support commands as well as files/scripts.\r\n\r\n## License\r\n\r\n[MIT](https://choosealicense.com/licenses/mit/)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoojscript%2Fenginer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoojscript%2Fenginer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoojscript%2Fenginer/lists"}