{"id":42496437,"url":"https://github.com/konforti/worker","last_synced_at":"2026-01-28T12:42:31.574Z","repository":{"id":57125399,"uuid":"141919904","full_name":"konforti/worker","owner":"konforti","description":"⚙️ Webworkers within your code","archived":false,"fork":false,"pushed_at":"2018-08-17T06:19:18.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-10T03:56:02.854Z","etag":null,"topics":["performance","process","thread","web-worker","web-workers"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@konforti/worker","language":"JavaScript","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/konforti.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}},"created_at":"2018-07-22T18:17:05.000Z","updated_at":"2018-08-17T06:12:56.000Z","dependencies_parsed_at":"2022-08-24T14:57:02.160Z","dependency_job_id":null,"html_url":"https://github.com/konforti/worker","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/konforti/worker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konforti%2Fworker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konforti%2Fworker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konforti%2Fworker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konforti%2Fworker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konforti","download_url":"https://codeload.github.com/konforti/worker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konforti%2Fworker/sbom","scorecard":{"id":566860,"data":{"date":"2025-08-11","repo":{"name":"github.com/konforti/worker","commit":"c0824c47e3da6d53b515c4feab8a9da63793eab0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T15:12:47.375Z","repository_id":57125399,"created_at":"2025-08-20T15:12:47.375Z","updated_at":"2025-08-20T15:12:47.375Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T12:37:07.070Z","status":"ssl_error","status_checked_at":"2026-01-28T12:37:06.657Z","response_time":57,"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":["performance","process","thread","web-worker","web-workers"],"created_at":"2026-01-28T12:42:30.792Z","updated_at":"2026-01-28T12:42:31.563Z","avatar_url":"https://github.com/konforti.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- \u003cdiv align=\"center\"\u003e\n  \u003cimg\n  width=\"1000\"\n  src=\"examples/worker.png\" alt=\"worker\"\u003e\n\u003c/div\u003e --\u003e\n\n# ⚙️ Worker\n\n## ✨ Features:\n\n-   Move a function into a web worker.\n-   Supports async function.\n-   Accept any [structured clone types](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#Supported_types.) as arguments.\n-   Accept **functions** as arguments.\n\nSee [Non blocking example](https://codesandbox.io/s/8x82oz2vz2)\n\n## 🔧 Installation\n\n```bash\n    npm i -S @konforti/worker\n```\n\n```bash\n    yarn add @konforti/worker\n```\n\n## ✏️ Usage\n\n```js\nimport worker from '@konforti/worker';\n```\n\n## 🔦 Usage examples\n\n```js\n// Function in worker\n\nfunction fibo(n) {\n    return n \u003e 1 ? fibo(n - 1) + fibo(n - 2) : 1;\n}\n\nconst run = worker(fibo);\nrun(333).then(res =\u003e console.log(res));\n```\n\n```js\n// Async function in worker\n\nconst run = worker(async username =\u003e {\n    const url = `https://api.github.com/users/${username}/repos`;\n    const res = await fetch(url);\n    const repos = await res.json();\n    return repos.map(r =\u003e r.full_name);\n});\n\nrun('konforti').then(res =\u003e console.log(res));\n```\n\n```js\n// Pass a callback function as argument\n\nconst fn = callback =\u003e `First we take Manhattan, ${callback()}`;\nconst run = worker(fn);\nrun(() =\u003e 'Then we take Berlin.').then(res =\u003e console.log(res));\n```\n\n```js\n// Inject imported function into worker scope\n\nimport mathModule from './math.js';\n\nconst calc = (sum, times) =\u003e {\n    const a = sum(2, 3);\n    const b = times(4, 5);\n    return sum(a, b);\n};\n\nconst run = worker(calc);\nrun(mathModule.sum, mathModule.times).then(res =\u003e console.log(res));\n```\n\n## 🔏 Limitations\n\nThe function and any argument passes cannot rely on its surrounding scope, since it is executed in an isolated context.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonforti%2Fworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonforti%2Fworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonforti%2Fworker/lists"}