{"id":29022880,"url":"https://github.com/blackaslight/thread","last_synced_at":"2025-06-26T03:04:02.827Z","repository":{"id":298091230,"uuid":"998830171","full_name":"BlackAsLight/thread","owner":"BlackAsLight","description":"A wrapper API around the Web Worker API","archived":false,"fork":false,"pushed_at":"2025-06-20T05:55:02.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-20T06:34:26.544Z","etag":null,"topics":["browser","deno","javascript","typescript","webworker"],"latest_commit_sha":null,"homepage":"https://jsr.io/@doctor/thread","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/BlackAsLight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-06-09T10:15:05.000Z","updated_at":"2025-06-20T05:54:36.000Z","dependencies_parsed_at":"2025-06-09T11:36:58.318Z","dependency_job_id":null,"html_url":"https://github.com/BlackAsLight/thread","commit_stats":null,"previous_names":["blackaslight/thread"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/BlackAsLight/thread","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackAsLight%2Fthread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackAsLight%2Fthread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackAsLight%2Fthread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackAsLight%2Fthread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackAsLight","download_url":"https://codeload.github.com/BlackAsLight/thread/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackAsLight%2Fthread/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261990350,"owners_count":23241187,"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":["browser","deno","javascript","typescript","webworker"],"created_at":"2025-06-26T03:04:02.316Z","updated_at":"2025-06-26T03:04:02.804Z","avatar_url":"https://github.com/BlackAsLight.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thread\n\nThread is a small module that wraps around the Web Worker API to offer a more\npromise like experience to pass values to and receive values from web workers.\n\n## Example main.ts\n\n```ts ignore\nimport { assertEquals } from \"jsr:@std/assert\";\nimport { Thread } from \"jsr:@doctor/thread\";\n\nconst thread = new Thread\u003c[number[], number]\u003e(\n  new URL(\"./worker.ts\", import.meta.url).href,\n);\n\nassertEquals(await thread.send([1, 2, 3]), 6);\nthread.terminate();\n```\n\n## Example worker.ts\n\n```ts ignore\nimport { listen } from \"jsr:@doctor/thread/worker\";\n\nlisten\u003c[number[], number]\u003e(function (input) {\n  return [input.reduce((x, y) =\u003e x + y)];\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackaslight%2Fthread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackaslight%2Fthread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackaslight%2Fthread/lists"}