{"_id":"worker-fn","_rev":"29-ae521eee5895133c480131136a538341","name":"worker-fn","dist-tags":{"latest":"3.2.1","beta":"3.2.0-beta.2"},"versions":{"0.9.1":{"name":"worker-fn","type":"module","version":"0.9.1","packageManager":"pnpm@8.15.3","description":"Run functions with Web Worker.","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["template"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@antfu/eslint-config-ts":"^0.43.1","@types/node":"^20.11.19","@vitest/coverage-v8":"^1.3.0","eslint":"^8.56.0","tsup":"^8.0.2","tsx":"^4.7.1","typescript":"^5.3.3","vitest":"^1.3.0"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsup src/index.ts --dts --format cjs,esm --clean","test":"vitest","test:cover":"vitest --coverage","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@0.9.1","_integrity":"sha512-O6/wN6uASzkaYWZgFY9D6bWvlhoeTPDGA5TzvH/S8p0BO5EDYkN1yhQO5HRZAfKkZD7PzdUW0PqzAyg0lPgA1w==","_resolved":"/tmp/34627360c9119b871797ac272fc58c5c/worker-fn-0.9.1.tgz","_from":"file:worker-fn-0.9.1.tgz","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-O6/wN6uASzkaYWZgFY9D6bWvlhoeTPDGA5TzvH/S8p0BO5EDYkN1yhQO5HRZAfKkZD7PzdUW0PqzAyg0lPgA1w==","shasum":"25dc51b3cd73316b37e907e2fec3886b60163ca8","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-0.9.1.tgz","fileCount":7,"unpackedSize":7444,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBVaKABo6HbaWV82nSkogONmQCNNBNpNksGzG+orZ/lAiEAj1yQjAiPNX73ukaQmYlrL3hN71cdCl7H05l8qjErrDE="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_0.9.1_1708326724642_0.7678764963538347"},"_hasShrinkwrap":false},"0.9.2":{"name":"worker-fn","type":"module","version":"0.9.2","packageManager":"pnpm@8.15.3","description":"Run functions using Web Worker.","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Worker","function","browser"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@antfu/eslint-config-ts":"^0.43.1","@types/node":"^20.11.19","@vitest/coverage-v8":"^1.3.0","eslint":"^8.56.0","tsup":"^8.0.2","tsx":"^4.7.1","typescript":"^5.3.3","vitest":"^1.3.0"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsup src/index.ts --dts --format cjs,esm --clean","test":"vitest","test:cover":"vitest --coverage","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@0.9.2","_integrity":"sha512-wofzc2q3Sl66RW3fmNwx7/YT7tkW5yhX5i7c58j1kTridT4RLHXceNrD4Fezdrvci1PgCu/4YhY3lyot4uBjNA==","_resolved":"/tmp/7e5f47584e57c979a5e0b3f69ae70f0b/worker-fn-0.9.2.tgz","_from":"file:worker-fn-0.9.2.tgz","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-wofzc2q3Sl66RW3fmNwx7/YT7tkW5yhX5i7c58j1kTridT4RLHXceNrD4Fezdrvci1PgCu/4YhY3lyot4uBjNA==","shasum":"a2836eb13cc4dbfad0f2d26680af24b7650884a5","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-0.9.2.tgz","fileCount":7,"unpackedSize":8121,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEBnauXhiHhCLQYeWxo2yeL5UW4ObxKc67N2/4vdMk/fAiBX3C7vfo5lrfe6VWLk5InreohByQk1yWRbTYbrCkgZKQ=="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_0.9.2_1708328926974_0.7650620246517648"},"_hasShrinkwrap":false},"1.0.0":{"name":"worker-fn","type":"module","version":"1.0.0","packageManager":"pnpm@8.15.3","description":"Run functions using Web Worker.","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Worker","function","browser"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@antfu/eslint-config-ts":"^0.43.1","@types/node":"^20.11.19","@vitest/coverage-v8":"^1.3.0","eslint":"^8.56.0","tsup":"^8.0.2","tsx":"^4.7.1","typescript":"^5.3.3","vitest":"^1.3.0"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsup src/index.ts --dts --format cjs,esm --clean","test":"vitest","test:cover":"vitest --coverage","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@1.0.0","_integrity":"sha512-epwQEoz+g35fN9kElH790DpBcvG20BJVVjwkdaGw92So2MGKwgxOwkIUEEGx0Bt90aEsOuQtjQPfuBfgBlpxbw==","_resolved":"/tmp/b4a6ade4965abcbff78584424e3119d9/worker-fn-1.0.0.tgz","_from":"file:worker-fn-1.0.0.tgz","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-epwQEoz+g35fN9kElH790DpBcvG20BJVVjwkdaGw92So2MGKwgxOwkIUEEGx0Bt90aEsOuQtjQPfuBfgBlpxbw==","shasum":"99ca084b40f9adcc00a42b184a493df78a423e00","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-1.0.0.tgz","fileCount":7,"unpackedSize":10041,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAcfrdyZshQLrttX3KycHOUoCbVnIFVZ2H4DnZ7vZtzmAiAZ+m2pm7UinoVZc2R+xpxAPmfqo4wYA+/uXMqIY9dvwQ=="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_1.0.0_1708438478274_0.131984628058454"},"_hasShrinkwrap":false},"1.0.1":{"name":"worker-fn","type":"module","version":"1.0.1","packageManager":"pnpm@8.15.3","description":"Run functions using Web Worker.","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Worker","function","browser"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@antfu/eslint-config-ts":"^0.43.1","@types/node":"^20.11.19","@vitest/coverage-v8":"^1.3.0","eslint":"^8.56.0","tsup":"^8.0.2","tsx":"^4.7.1","typescript":"^5.3.3","vitest":"^1.3.0"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsup src/index.ts --dts --format cjs,esm --clean","test":"vitest","test:cover":"vitest --coverage","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@1.0.1","_integrity":"sha512-8fJG9iSyxwVzumm8yfGA+vChk9Q2Yl18HBHnL/Kx4k2sOynfWNuN6cS5RTZL5hneIZQ8uljor40CeKksoIEr6w==","_resolved":"/tmp/78e2528f3d9785f9428feae135c6c384/worker-fn-1.0.1.tgz","_from":"file:worker-fn-1.0.1.tgz","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-8fJG9iSyxwVzumm8yfGA+vChk9Q2Yl18HBHnL/Kx4k2sOynfWNuN6cS5RTZL5hneIZQ8uljor40CeKksoIEr6w==","shasum":"fe429e42d2b42d614185dcbe43143b716bb25f63","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-1.0.1.tgz","fileCount":7,"unpackedSize":10057,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJ3fdJdY9jaXzrWEJ/le/p198Ay1xe8uHNfAFbDaxqTwIgB6fteSqqOkWZ7PXCCnhMgcUTsNoSU6Pol8mSZvrojYI="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_1.0.1_1708439304739_0.6828559687471933"},"_hasShrinkwrap":false},"1.0.3":{"name":"worker-fn","type":"module","version":"1.0.3","packageManager":"pnpm@8.15.3","description":"Run functions using Web Worker.","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Worker","function","browser"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@antfu/eslint-config-ts":"^0.43.1","@types/node":"^20.11.19","@vitest/coverage-v8":"^1.3.0","eslint":"^8.56.0","tsup":"^8.0.2","tsx":"^4.7.1","typescript":"^5.3.3","vitest":"^1.3.0"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsup src/index.ts --dts --format cjs,esm --clean","test":"vitest","test:cover":"vitest --coverage","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@1.0.3","_integrity":"sha512-R61K6LvJyMchqU2QMlaVYwICCem5Uqa5jjttphYci9OERdk3QZZfdE+BFE0qU6bG+/mbdK35ONqFiAxdMZFIwQ==","_resolved":"/tmp/06d0ae4db769eeff64558726a9ecea98/worker-fn-1.0.3.tgz","_from":"file:worker-fn-1.0.3.tgz","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-R61K6LvJyMchqU2QMlaVYwICCem5Uqa5jjttphYci9OERdk3QZZfdE+BFE0qU6bG+/mbdK35ONqFiAxdMZFIwQ==","shasum":"1aa601ccc452146262901ec4a1cc9b6f266aeca7","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-1.0.3.tgz","fileCount":7,"unpackedSize":10973,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEAoPhjpqQRUUNEL9ykg1QF9D9wbHI68YR14zSQvCDe7AiAwGH09jyGpBviIyoAfPbZCZtYhkj9xj6sAL8qGHkzf7A=="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_1.0.3_1708485444200_0.6299479318234213"},"_hasShrinkwrap":false},"1.0.5":{"name":"worker-fn","type":"module","version":"1.0.5","packageManager":"pnpm@8.15.3","description":"Run functions using Web Worker.","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Worker","function","browser"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@antfu/eslint-config-ts":"^0.43.1","@types/node":"^20.11.19","@vitest/coverage-v8":"^1.3.0","eslint":"^8.56.0","tsup":"^8.0.2","tsx":"^4.7.1","typescript":"^5.3.3","vitest":"^1.3.0"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsup src/index.ts --dts --format cjs,esm --clean","test":"vitest","test:cover":"vitest --coverage","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@1.0.5","_integrity":"sha512-pCeE9Y1O46AJX6TtvfzPnBRBFFtJBg6077wPiKe4m2mGIYmf01yEWYhqxVKss7ZZUBL1G0p+G+sGRNRz2NpzFA==","_resolved":"/tmp/e289b48296c3a83aae3a312eb48cffdc/worker-fn-1.0.5.tgz","_from":"file:worker-fn-1.0.5.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-pCeE9Y1O46AJX6TtvfzPnBRBFFtJBg6077wPiKe4m2mGIYmf01yEWYhqxVKss7ZZUBL1G0p+G+sGRNRz2NpzFA==","shasum":"afb5aa38d466af2bda46b56f72471d1b6c0f0d18","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-1.0.5.tgz","fileCount":7,"unpackedSize":11187,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDmp0MoPADy9jh5qDjajTpVlqJeEUUxBAnfV3WR2vPyqAiEApmyLMBLz6997Djt8/M5rPs5AClaf7jLGY5cSynvZKeA="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_1.0.5_1708682287765_0.8126228452536246"},"_hasShrinkwrap":false},"1.0.6":{"name":"worker-fn","type":"module","version":"1.0.6","packageManager":"pnpm@8.15.3","description":"Creating and invoking mirrored proxy functions in the JavaScript main thread to execute the corresponding actual functions in the worker thread.","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@antfu/eslint-config-ts":"^0.43.1","@types/node":"^20.11.19","@vitest/coverage-v8":"^1.3.0","eslint":"^8.56.0","tsup":"^8.0.2","tsx":"^4.7.1","typescript":"^5.3.3","vitest":"^1.3.0"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsup src/index.ts --dts --format cjs,esm --clean","test":"vitest","test:cover":"vitest --coverage","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@1.0.6","_integrity":"sha512-8PAK/7/34iLoEZ2Lvz01JXiBdmZJHUoE0+Zm8kIcBmKWqgQIYzVvWY6IMKjGafuKFv7Wrfl9EnnXiY6uSRkCXg==","_resolved":"/tmp/0bb0ad455e3b66a32369298f073f9823/worker-fn-1.0.6.tgz","_from":"file:worker-fn-1.0.6.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-8PAK/7/34iLoEZ2Lvz01JXiBdmZJHUoE0+Zm8kIcBmKWqgQIYzVvWY6IMKjGafuKFv7Wrfl9EnnXiY6uSRkCXg==","shasum":"1d7d10f65cd4e027fd1a6f1f36bb8746677d42c0","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-1.0.6.tgz","fileCount":7,"unpackedSize":11340,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSOl2KSHEqzslwS7srI6HFQf5bfs40tV5u9hmGmua5FgIgAl9Wdftc/wniSLuYyGC969qD7/7j/DA/oLPa1JEZMdY="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_1.0.6_1708682700995_0.8134340477955022"},"_hasShrinkwrap":false},"2.1.1":{"name":"worker-fn","version":"2.1.1","description":"worker-fn allows you to easily create proxy functions in the JavaScript main thread that call corresponding worker functions defined in worker threads. The proxy function has the same function signature as the worker function.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"dependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.1.1","_integrity":"sha512-5XrXU1hQMMQa7D4V76RYtTKbJQNFs1GF1y+6Br0sm0QHX/hd8hEdNgH5RCGiZmVrrsczxtg91GpnViRfbcv/Cg==","_resolved":"/tmp/0188491494125801cba2e680ba8670c0/worker-fn-2.1.1.tgz","_from":"file:worker-fn-2.1.1.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-5XrXU1hQMMQa7D4V76RYtTKbJQNFs1GF1y+6Br0sm0QHX/hd8hEdNgH5RCGiZmVrrsczxtg91GpnViRfbcv/Cg==","shasum":"1eba5cb1bb7365c1c9b545d37f762583af55f8d3","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.1.1.tgz","fileCount":5,"unpackedSize":8915,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/AkeOafdCGVcr3dsOU/t+wwE5+2VtS8tXSXlRZZ9kIgIgFW6s3H6CKCxJquGGMFBGsxVgM3IxfaV1oN35PJIuJC8="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.1.1_1708769196263_0.7554590673230492"},"_hasShrinkwrap":false},"2.1.2":{"name":"worker-fn","version":"2.1.2","description":"worker-fn allows you to easily create proxy functions in the JavaScript main thread that call corresponding worker functions defined in worker threads. The proxy function has the same function signature as the worker function.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"dependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.1.2","_integrity":"sha512-O1r7M99eQgD2HPGfOBD6XITNyx7Mo8/mEDo99Tc7LvCSnqyGBr+2f2r9JsWVJa+IYrz2cGL6V1cvhNQwIh32BQ==","_resolved":"/tmp/9788f3c8d2253fb151506cf779be0329/worker-fn-2.1.2.tgz","_from":"file:worker-fn-2.1.2.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-O1r7M99eQgD2HPGfOBD6XITNyx7Mo8/mEDo99Tc7LvCSnqyGBr+2f2r9JsWVJa+IYrz2cGL6V1cvhNQwIh32BQ==","shasum":"bf9ea79ea8f4a323690ea95dd77e21a841404621","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.1.2.tgz","fileCount":5,"unpackedSize":8915,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCeyjKtAbqd45WpDUxEboYuVAwys9ne2pf2sMlAnBtw2QIhALcTUwK32F71Xl5dFtF72fdWFUMGev1ON006hGz6nVkO"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.1.2_1708769471801_0.156333643635979"},"_hasShrinkwrap":false},"2.1.3":{"name":"worker-fn","version":"2.1.3","description":"worker-fn allows you to easily create proxy functions in the JavaScript main thread that call corresponding worker functions defined in worker threads. The proxy function has the same function signature as the worker function.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"dependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.1.3","_integrity":"sha512-30wy8MX2jqzRvWqDYuG8HLM5FzuHJN6eUly6u2zvY3fiXaTss9jwYvKY0BdPuT3z67M2dmjjSao6/xLlftvSvw==","_resolved":"/tmp/43516c741f7aca6f3d941bad28097b87/worker-fn-2.1.3.tgz","_from":"file:worker-fn-2.1.3.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-30wy8MX2jqzRvWqDYuG8HLM5FzuHJN6eUly6u2zvY3fiXaTss9jwYvKY0BdPuT3z67M2dmjjSao6/xLlftvSvw==","shasum":"fefe2bce68eb35f85aa4ec9024d1e6d62784539a","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.1.3.tgz","fileCount":5,"unpackedSize":8915,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFarVMODB7sfIftAaL+dzDddE7kWeWoeEeHhga77KlSZAiAUUSph6Hgv4RlCUcqpDRvOfKsRmtrVZTGcmHF5ZNhJeA=="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.1.3_1708769909373_0.6218338511634802"},"_hasShrinkwrap":false},"2.1.4":{"name":"worker-fn","version":"2.1.4","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"dependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.1.4","_integrity":"sha512-oy2OvxsnPz4mKNDczEkL7xEC6h0E27CdyuW7d9aUHx03yaHN0RNVfIdxIA923L0AenevHwoG9pMkyv7HdNlOPg==","_resolved":"/tmp/4c49495148fabff73cba084787dca52b/worker-fn-2.1.4.tgz","_from":"file:worker-fn-2.1.4.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-oy2OvxsnPz4mKNDczEkL7xEC6h0E27CdyuW7d9aUHx03yaHN0RNVfIdxIA923L0AenevHwoG9pMkyv7HdNlOPg==","shasum":"cabd30972477ca26b8a7c21a98d5c0882d581539","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.1.4.tgz","fileCount":5,"unpackedSize":9971,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuh+o7619//ez6jJu98OREOnZuYH/umjY34jLcocJrPgIgNIi/LhbuZAI/Zhr7fc8201MFGI31h91p1LslMjihHZg="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.1.4_1708795917933_0.39656530168076953"},"_hasShrinkwrap":false},"2.1.5":{"name":"worker-fn","version":"2.1.5","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"dependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.1.5","_integrity":"sha512-VWdxmkkthTyAx/Z7Q737iQhiB91ptKz3lI2y40qbcGc5+7Mdr097Smi/EJiD15kFu1HiIZE+XuqbrPNW5Mru6g==","_resolved":"/tmp/cdb8a33122435f8c414e1f440d30f360/worker-fn-2.1.5.tgz","_from":"file:worker-fn-2.1.5.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-VWdxmkkthTyAx/Z7Q737iQhiB91ptKz3lI2y40qbcGc5+7Mdr097Smi/EJiD15kFu1HiIZE+XuqbrPNW5Mru6g==","shasum":"456a29c1a5737ebcfa693005795c90ff0c4883ab","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.1.5.tgz","fileCount":5,"unpackedSize":10045,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDctQD86LFhJ0Ya2wAfOCKl3DuNs0X/S75gpSCAgNlKMgIgfrmZsoZOZ0JKx6GZwPMrzzqKNG+73/JsF/FmTmXGPKE="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.1.5_1708797465621_0.6775326632860033"},"_hasShrinkwrap":false},"2.2.0":{"name":"worker-fn","version":"2.2.0","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"dependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.2.0","_integrity":"sha512-bc1YmZmP/H0qgVQwe/AJ57pGJOKA9+fa459HbuIitsFloNA6yKpuQlGx0FJk+eOD3P57cuUYQC+N9phrRoBRyA==","_resolved":"/tmp/623b1d225a4c5d237792332c4b119500/worker-fn-2.2.0.tgz","_from":"file:worker-fn-2.2.0.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-bc1YmZmP/H0qgVQwe/AJ57pGJOKA9+fa459HbuIitsFloNA6yKpuQlGx0FJk+eOD3P57cuUYQC+N9phrRoBRyA==","shasum":"6767904a39475676bed5fb036cc16fbac5689f33","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.2.0.tgz","fileCount":5,"unpackedSize":12568,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC75p2Yn31lkdyIshTFi8lmMxfShDLHLDA/N6ioT90qvwIhAIpXko2IBuh340LP9zIGE1av3LPCPRlVrogBElWLFKS5"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.2.0_1708859217194_0.9331678736511242"},"_hasShrinkwrap":false},"2.2.1":{"name":"worker-fn","version":"2.2.1","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"dependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.2.1","_integrity":"sha512-k45VVsrDV9qeNwHNpaJBvT8i/Pl48L4CwUBY8BWwwk/N0wz2qpkkJjcNO1XWWSDEah2qOTl3aHf9uJ4IN46kKg==","_resolved":"/tmp/f4a3e2bbf7b64b8bd401b78bfae70e21/worker-fn-2.2.1.tgz","_from":"file:worker-fn-2.2.1.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-k45VVsrDV9qeNwHNpaJBvT8i/Pl48L4CwUBY8BWwwk/N0wz2qpkkJjcNO1XWWSDEah2qOTl3aHf9uJ4IN46kKg==","shasum":"b9af547be44cad87c1ac8c6714bede43e942eb0a","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.2.1.tgz","fileCount":5,"unpackedSize":12568,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAbtZqYc2easzWV/fz+psEGh6KfYAqBebMUaPpo+VDPUAiEAjFPohdekT4ORrPh4VzKhxbrm2BcjErAdwQGJJY13lok="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.2.1_1708859617629_0.4137084885831397"},"_hasShrinkwrap":false},"2.2.4":{"name":"worker-fn","version":"2.2.4","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.2.4","_integrity":"sha512-mUqkyjwcGVgbrrsZPyvKVxF0VKzHPEfbt7dQ1NZtKTTtuVRUwEVkytMI2JPJtiHLwhESRHN5D8G4mSACHZ8E3A==","_resolved":"/tmp/abf8b4226b43e2032c88565e468dac8b/worker-fn-2.2.4.tgz","_from":"file:worker-fn-2.2.4.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-mUqkyjwcGVgbrrsZPyvKVxF0VKzHPEfbt7dQ1NZtKTTtuVRUwEVkytMI2JPJtiHLwhESRHN5D8G4mSACHZ8E3A==","shasum":"ef959c70f703976b111a4ad5d840cbb60f8c3fff","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.2.4.tgz","fileCount":5,"unpackedSize":12621,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCb0iqx37azucQ13joRbKlsuomd7jHLoLayuNtf9QIlWAIhAIfY+CWgE0UMVTvz2eimmqZn/hd0hisfoKh02jY82ANy"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.2.4_1708865219833_0.7392004095570779"},"_hasShrinkwrap":false},"2.2.5":{"name":"worker-fn","version":"2.2.5","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js","require":"./dist/main.js"}},"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.2.5","_integrity":"sha512-Fi/e8sXwd7PI7FTA56/IaeNf6t3JrJWiCS5W6Q+Q3QPAzzEtTIFM1iFrmkzAggAA88nukaOxccE3AHROLHJ5iQ==","_resolved":"/tmp/d278c7febf47f45b8ec8507d22132fe7/worker-fn-2.2.5.tgz","_from":"file:worker-fn-2.2.5.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-Fi/e8sXwd7PI7FTA56/IaeNf6t3JrJWiCS5W6Q+Q3QPAzzEtTIFM1iFrmkzAggAA88nukaOxccE3AHROLHJ5iQ==","shasum":"12dfb9ff8c514a8cf173a49eb12ead9002765e80","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.2.5.tgz","fileCount":6,"unpackedSize":17014,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoeiKc/w1XNz85d+6QX5HCeyUntg/8SbVhwy2aSu+OzAIgBf/FxQcQ9M/FMBG3+V5Zktc+Psm2TzkByvz/GwzLhhg="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.2.5_1708868496312_0.4502139100368996"},"_hasShrinkwrap":false},"2.2.6":{"name":"worker-fn","version":"2.2.6","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js","require":"./dist/main.js"}},"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.2.6","_integrity":"sha512-MBSLz1tXBmFRyqspo0sgWn93l037F950YsFBohRqBGkt4bp0dBQ65foypEM5B3i7ZkpVr7pB2bW8BQI79RHd3w==","_resolved":"/tmp/0e3b10f73138f171cc45e7a82730eeb4/worker-fn-2.2.6.tgz","_from":"file:worker-fn-2.2.6.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-MBSLz1tXBmFRyqspo0sgWn93l037F950YsFBohRqBGkt4bp0dBQ65foypEM5B3i7ZkpVr7pB2bW8BQI79RHd3w==","shasum":"fca76df46243bbaae8638d92e7903b5c2feacb9e","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.2.6.tgz","fileCount":6,"unpackedSize":20264,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2BNuOnwN0viX2AdKRbTLKq3UyNJILEPO3wjsPjip8BwIhAI07mS9JxnhuONFtUXGW/5yyLbbVp7DCJHaFyUKYCqDY"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.2.6_1708919532203_0.639956815514936"},"_hasShrinkwrap":false},"2.2.8":{"name":"worker-fn","version":"2.2.8","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js","require":"./dist/main.js"}},"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.2.8","_integrity":"sha512-TC1HFFir2d7ixyotnxE0QKiI/i71Sa60Ln3rnHcX5gk3sFD3r2fsbIbv9diDuF7ROp7kDj6fLMkPtvFQATEeeg==","_resolved":"/tmp/9c001b16f02846db1be7e7fedb789bf7/worker-fn-2.2.8.tgz","_from":"file:worker-fn-2.2.8.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-TC1HFFir2d7ixyotnxE0QKiI/i71Sa60Ln3rnHcX5gk3sFD3r2fsbIbv9diDuF7ROp7kDj6fLMkPtvFQATEeeg==","shasum":"06d1543062aa24e3ae4056db1ee2047b97b48541","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.2.8.tgz","fileCount":6,"unpackedSize":20252,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcMRK90JPaKOWhXxhYO62ItkXE0gdCfcy44MIhzPboKwIhAMoOZYMGhmrMek7sdFoFZ+rQu/2tnd+6Yt5AHgFt+Lho"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.2.8_1709414994108_0.11676983647361538"},"_hasShrinkwrap":false},"2.2.9":{"name":"worker-fn","version":"2.2.9","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js","require":"./dist/main.js"}},"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@2.2.9","_integrity":"sha512-A1ckm4BtjJzolFb+1NWqaX7RPLa7mKP/J0F1eInlL1JwOPRYt6hFh0+MPO5fZRpXpsdv3BdudM5D2oR2JPW5GQ==","_resolved":"/tmp/b9de4c8ce3656656f4dd3a70c27f5d27/worker-fn-2.2.9.tgz","_from":"file:worker-fn-2.2.9.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-A1ckm4BtjJzolFb+1NWqaX7RPLa7mKP/J0F1eInlL1JwOPRYt6hFh0+MPO5fZRpXpsdv3BdudM5D2oR2JPW5GQ==","shasum":"b2c65c969c60f7cd7f6ddc5dfef1ecdc4e9673ee","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-2.2.9.tgz","fileCount":6,"unpackedSize":20389,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCObnwA6fTCZUghCsEd3yQTfbvGrLIZK6o0iOjNT39Q8QIhAJT3wKeDHuEki0aBcZX6lyO1iaGWjbG69SjWIHRFBHKe"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_2.2.9_1709416213396_0.2712828949034132"},"_hasShrinkwrap":false},"3.0.0":{"name":"worker-fn","version":"3.0.0","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js","require":"./dist/main.js"}},"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.0.0","_integrity":"sha512-mnFnv6BsCqm1FYp3t/f5QQft7ZlQ8ANvEKX8BzFi45WXtVF7o3lWrqq/Msu644HVvFRE2vPJqR2qYSMX9DVKEQ==","_resolved":"/tmp/b6bdebabb1d423f9d77289cd659b726d/worker-fn-3.0.0.tgz","_from":"file:worker-fn-3.0.0.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-mnFnv6BsCqm1FYp3t/f5QQft7ZlQ8ANvEKX8BzFi45WXtVF7o3lWrqq/Msu644HVvFRE2vPJqR2qYSMX9DVKEQ==","shasum":"ba7e5625362e9d83c63f600a27919f4c6f895d8a","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.0.0.tgz","fileCount":6,"unpackedSize":24791,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDyzyImrrXqePWGjGSpj+GuewfijhC6gobohsE8Xq8r/AiB53mTn4bT/gFL2gPmC8Upc0IrMTktKb5qZaaY3gKi/GA=="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.0.0_1710006494411_0.4670167525154476"},"_hasShrinkwrap":false},"3.0.1":{"name":"worker-fn","version":"3.0.1","description":"worker-fn hides the complexity of communication between the main thread and Worker threads, making it easy to call functions defined in the Worker.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js","require":"./dist/main.js"}},"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.0.1","_integrity":"sha512-R8b6i+aT/y1ZGf25T/NCs79o/rah5i5UiQgIZsJg5Mc+fyOwdZlutEz83PXXbmDm+l4J87eiBZDM8tWETTtL6A==","_resolved":"/tmp/4bcbf596bac5067220bbea155ff4a050/worker-fn-3.0.1.tgz","_from":"file:worker-fn-3.0.1.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-R8b6i+aT/y1ZGf25T/NCs79o/rah5i5UiQgIZsJg5Mc+fyOwdZlutEz83PXXbmDm+l4J87eiBZDM8tWETTtL6A==","shasum":"586b06b6958849d0bc4f35ef5400c6994f8e21de","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.0.1.tgz","fileCount":6,"unpackedSize":24791,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2M5oPVD9Bm6XKylP/f485q2q0LS/CsGNvgNrIqq3i5gIhAPR7Y1XcVgHnERhi/RIINf/Y8gCTZ7CaEdTb2cINegbK"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.0.1_1710008178440_0.3771342857620361"},"_hasShrinkwrap":false},"3.0.3":{"name":"worker-fn","version":"3.0.3","description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js","require":"./dist/main.js"}},"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.0.3","_integrity":"sha512-NBO7FIYQIiVswtRhvhh5cBT0n5D0g0sA6m6s8AOthbT8bUvAM9c4izMGO1nralNWQLenkKRCPalJ44sXra2a2A==","_resolved":"/tmp/13aef54c36ef07d2f7134e6542b9e678/worker-fn-3.0.3.tgz","_from":"file:worker-fn-3.0.3.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-NBO7FIYQIiVswtRhvhh5cBT0n5D0g0sA6m6s8AOthbT8bUvAM9c4izMGO1nralNWQLenkKRCPalJ44sXra2a2A==","shasum":"aa16c899992d4bf0eaadcc57dfdccd91091cd0d7","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.0.3.tgz","fileCount":6,"unpackedSize":24830,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA9wKTOoh8sx0EeAq7bjMDz+JksFFGTgqVVKrcbjSHLNAiEArHsaGXI9fS8zuyszEOSrKHyDNuhbXZE6yvmiahM5KgU="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.0.3_1710016085929_0.9913701829374943"},"_hasShrinkwrap":false},"3.0.4":{"name":"worker-fn","version":"3.0.4","description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.6.1","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js","require":"./dist/main.js"}},"devDependencies":{"tsup":"^8.0.2","typescript":"^5.3.3"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.0.4","_integrity":"sha512-J0uuXWRs9Jcz1ilgloy7OOqPoaF9/DPMGLnwtelBBerfvL+wjAHTAfoGizl65xOP7BeEB61Uw6+E/spXkaTnsg==","_resolved":"/tmp/019ab888216575e436fe23dee8516b82/worker-fn-3.0.4.tgz","_from":"file:worker-fn-3.0.4.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-J0uuXWRs9Jcz1ilgloy7OOqPoaF9/DPMGLnwtelBBerfvL+wjAHTAfoGizl65xOP7BeEB61Uw6+E/spXkaTnsg==","shasum":"994d1f8549f9661915e1af0955b920d8fbcb5dc7","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.0.4.tgz","fileCount":6,"unpackedSize":25827,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVzvVLYviUSgGkJNaSMBWZlDhsv1hhI0d65iLrkWwqhwIhAKrOMmB1jBsq+KO1EDGznvs00AUL7hLYw6gQPBFrJtLC"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.0.4_1710624119103_0.7048689938030694"},"_hasShrinkwrap":false},"3.1.0":{"name":"worker-fn","version":"3.1.0","description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.15.4","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js","require":"./dist/main.js"}},"devDependencies":{"@okikio/transferables":"npm:@jsr/okikio__transferables@^1.0.2","tsup":"^8.0.2","typescript":"^5.4.2"},"scripts":{"version":"node scripts/version.js","build":"npx tsup src/main.ts --clean --dts --format esm"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.1.0","_integrity":"sha512-Xr+d/hOxLJWaHBz6crDIRZxRF8JvfzLIi0C7syMdqdHwc5TotxM5cmn2amyjAh2HnYo/QZKfu2EZ81M0ebRDBg==","_resolved":"/tmp/8bc798ca9d4c9a4da3c76ba6d75846dd/worker-fn-3.1.0.tgz","_from":"file:worker-fn-3.1.0.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-Xr+d/hOxLJWaHBz6crDIRZxRF8JvfzLIi0C7syMdqdHwc5TotxM5cmn2amyjAh2HnYo/QZKfu2EZ81M0ebRDBg==","shasum":"fa15fa6d48bec55ff6c4dba4ad717c4deb782864","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.1.0.tgz","fileCount":5,"unpackedSize":24053,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+BP37wDKr6zDHePOc9lfE+C47eZgpRN82DCWcguS3vAIhAJb4bM/Puq5JSbAlfl4B7OpLIv2WOcA222YHSiO+qrVd"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.1.0_1710687062516_0.9744619726279247"},"_hasShrinkwrap":false},"3.1.1":{"name":"worker-fn","version":"3.1.1","description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.15.5","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"import":"./dist/main.js","require":"./dist/main.cjs","types":"./dist/main.d.ts"}},"devDependencies":{"@okikio/transferables":"npm:@jsr/okikio__transferables@^1.0.2","tsup":"^8.0.2","typescript":"^5.4.2"},"scripts":{"clean":"node scripts/clean.js","build":"pnpm run prepare && tsup src/main.ts --format cjs,esm --dts","build:clean":"pnpm run build && pnpm run clean"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.1.1","_integrity":"sha512-QXOPpENZNkx5bdpwdoD5wVomk+T7wnCfOYx29QnCdRFubiSLtzkTtxyCi92frIE8Eu29h5FUPb+mB0gY91l/xQ==","_resolved":"/tmp/9c494c8ff560ebe663a4bf99b35f3345/worker-fn-3.1.1.tgz","_from":"file:worker-fn-3.1.1.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-QXOPpENZNkx5bdpwdoD5wVomk+T7wnCfOYx29QnCdRFubiSLtzkTtxyCi92frIE8Eu29h5FUPb+mB0gY91l/xQ==","shasum":"8647e32df90c13e5f0c67bb3552b89b2c2049c9e","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.1.1.tgz","fileCount":7,"unpackedSize":42634,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/worker-fn@3.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/SpOtRg3K04g3pwEO4muaMnHbNsw96EIb9XwlVIF1kQIhALWKtgabsdcak9Y7W/VVY48V9kKrFTKmFKDCqv68V5fz"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.1.1_1711463269627_0.6641379206096958"},"_hasShrinkwrap":false},"3.1.2":{"name":"worker-fn","version":"3.1.2","description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.15.5","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"import":"./dist/main.js","require":"./dist/main.cjs","types":"./dist/main.d.ts"}},"devDependencies":{"@okikio/transferables":"npm:@jsr/okikio__transferables@^1.0.2","tsup":"^8.0.2","typescript":"^5.4.2"},"scripts":{"clean":"node scripts/clean.js","build":"pnpm run prepare && tsup src/main.ts --format cjs,esm --dts","build:clean":"pnpm run build && pnpm run clean"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.1.2","_integrity":"sha512-ZBzgqrDiwIWW4Cfw+Bvy3sdZUc3+uE+h82NoJKKyZvtWx9KfFAK/Y8E2VPWsfpFrS3IuDok0DZEegXDrljfh1Q==","_resolved":"/tmp/37d5726094cbb73d6bd4ed021c42a43e/worker-fn-3.1.2.tgz","_from":"file:worker-fn-3.1.2.tgz","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-ZBzgqrDiwIWW4Cfw+Bvy3sdZUc3+uE+h82NoJKKyZvtWx9KfFAK/Y8E2VPWsfpFrS3IuDok0DZEegXDrljfh1Q==","shasum":"159958ccc6c27c591399c7bf7778db34f52ad259","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.1.2.tgz","fileCount":7,"unpackedSize":42600,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/worker-fn@3.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3sdqYujSM2zDJY9UWIK91IzcT+eHpPBIcS4WdIL+x1AiAhvA/XwT3GnuMpMVlmobuWtgR7NZHu0gb8LU5mwImx7Q=="}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.1.2_1711464113274_0.8562897825279179"},"_hasShrinkwrap":false},"3.2.0-beta.1":{"name":"worker-fn","version":"3.2.0-beta.1","description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","type":"module","author":{"name":"mys1024"},"packageManager":"pnpm@8.15.5","license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"import":"./dist/main.js","require":"./dist/main.cjs","types":"./dist/main.d.ts"}},"dependencies":{"@mys/m-rpc":"npm:@mys-x/m-rpc@^0.12.1"},"devDependencies":{"@okikio/transferables":"npm:@jsr/okikio__transferables@^1.0.2","tsup":"^8.0.2","typescript":"^5.4.2"},"scripts":{"pre":"node scripts/prepare.js","clean":"node scripts/clean.js","build":"pnpm run pre && tsup src/main.ts --format cjs,esm --dts","build:clean":"pnpm run build && pnpm run clean"},"readme":"<div align=\"center\">\n\n# worker-fn\n\n[![jsr-version](https://img.shields.io/jsr/v/@mys/worker-fn?style=flat-square&color=%23f7df1e)](https://jsr.io/@mys/worker-fn)\n[![npm-version](https://img.shields.io/npm/v/worker-fn?style=flat-square&color=%23cb3837)](https://www.npmjs.com/package/worker-fn)\n[![npm-minzip](https://img.shields.io/bundlephobia/minzip/worker-fn?style=flat-square&label=minzip)](https://bundlephobia.com/package/worker-fn)\n[![docs](https://img.shields.io/badge/docs-reference-blue?style=flat-square)](https://jsr.io/@mys/worker-fn/doc?style=flat-square)\n[![stars](https://img.shields.io/github/stars/mys1024/worker-fn?style=flat-square)](https://github.com/mys1024/worker-fn)\n[![license](https://img.shields.io/github/license/mys1024/worker-fn?&style=flat-square)](./LICENSE)\n\n[![workflow-ci](https://img.shields.io/github/actions/workflow/status/mys1024/worker-fn/ci.yml?label=ci&style=flat-square)](https://github.com/mys1024/worker-fn/actions/workflows/ci.yml)\n[![workflow-release](https://img.shields.io/github/actions/workflow/status/mys1024/worker-fn/release.yml?label=release&style=flat-square)](https://github.com/mys1024/worker-fn/actions/workflows/release.yml)\n\nEnglish | [中文文档](./README_zh.md)\n\n</div>\n\n`worker-fn` hides the complexity of communication between the JavaScript main\nthread and [Worker](https://developer.mozilla.org/docs/Web/API/Web_Workers_API)\nthreads, making it easy to call the functions defined in workers.\n\n`worker-fn` allows you to create **proxy functions** in the main thread that\ncall the corresponding **worker functions** defined in Worker threads through\nmessage events. Proxy functions have the same function signatures as the\ncorresponding worker functions (except that the return values of proxy functions\nwill be wrapped in Promises).\n\n![concepts](./docs/concepts.png)\n\n## Usage\n\n### Basic\n\n`math.worker.js`:\n\n```javascript\nimport { defineWorkerFn } from \"worker-fn\";\n\nfunction add(a, b) {\n  return a + b;\n}\n\nfunction fib(n) {\n  return n <= 2 ? 1 : fib(n - 1) + fib(n - 2);\n}\n\ndefineWorkerFn(\"add\", add);\ndefineWorkerFn(\"fib\", fib);\n```\n\n`math.js`:\n\n```javascript\nimport { useWorkerFn } from \"worker-fn\";\n\nconst worker = new Worker(new URL(\"./math.worker.js\", import.meta.url), {\n  type: \"module\",\n});\n\nconst add = useWorkerFn(\"add\", worker);\nconst fib = useWorkerFn(\"fib\", worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n### Using in Node.js with `node:worker_threads`\n\n<details>\n\n<summary>Example</summary>\n\n`math.worker.js`:\n\n```javascript\nimport { parentPort } from \"node:worker_threads\";\nimport { defineWorkerFn } from \"worker-fn\";\n\nfunction add(a, b) {\n  return a + b;\n}\n\nfunction fib(n) {\n  return n <= 2 ? 1 : fib(n - 1) + fib(n - 2);\n}\n\ndefineWorkerFn(\"add\", add, { port: parentPort });\ndefineWorkerFn(\"fib\", fib, { port: parentPort });\n```\n\n`math.js`:\n\n```javascript\nimport { Worker } from \"node:worker_threads\";\nimport { useWorkerFn } from \"worker-fn\";\n\nconst worker = new Worker(new URL(\"./math.worker.js\", import.meta.url));\n\nconst add = useWorkerFn(\"add\", worker);\nconst fib = useWorkerFn(\"fib\", worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n</details>\n\n### Using `defineWorkerFns()` and `useWorkerFns()`\n\n<details>\n\n<summary>Example</summary>\n\n`math.worker.js`:\n\n```javascript\nimport { defineWorkerFns } from \"worker-fn\";\n\nconst fns = {\n  add(a, b) {\n    return a + b;\n  },\n  fib(n) {\n    return n <= 2 ? 1 : fns.fib(n - 1) + fns.fib(n - 2);\n  },\n};\n\ndefineWorkerFns(fns);\n```\n\n`math.js`:\n\n```javascript\nimport { useWorkerFns } from \"worker-fn\";\n\nconst worker = new Worker(new URL(\"./math.worker.js\", import.meta.url), {\n  type: \"module\",\n});\n\nconst { add, fib } = useWorkerFns(worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n</details>\n\n### Using with TypeScript\n\n<details>\n\n<summary>Example</summary>\n\n`math.worker.ts`:\n\n```typescript\nimport { defineWorkerFn } from \"worker-fn\";\n\nfunction add(a: number, b: number) {\n  return a + b;\n}\n\nfunction fib(n: number): number {\n  return n <= 2 ? 1 : fib(n - 1) + fib(n - 2);\n}\n\ndefineWorkerFn(\"add\", add);\ndefineWorkerFn(\"fib\", fib);\n\nexport type Add = typeof add;\nexport type Fib = typeof fib;\n```\n\n`math.ts`:\n\n```typescript\nimport { useWorkerFn } from \"worker-fn\";\nimport type { Add, Fib } from \"./math.worker.ts\";\n\nconst worker = new Worker(new URL(\"./math.worker.ts\", import.meta.url), {\n  type: \"module\",\n});\n\nconst add = useWorkerFn<Add>(\"add\", worker);\nconst fib = useWorkerFn<Fib>(\"fib\", worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n</details>\n\n## Importing from JSR\n\n`worker-fn` is published on both [npm](https://www.npmjs.com/package/worker-fn)\nand [JSR](https://jsr.io/@mys/worker-fn). If you want to import `worker-fn` from\nJSR, please refer to\n[this document](https://jsr.io/docs/introduction#using-jsr-packages).\n\n## License\n\n[MIT](./LICENSE) License &copy; 2024-PRESENT\n[mys1024](https://github.com/mys1024)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.2.0-beta.1","_integrity":"sha512-GKYrv1+SNpxFPVqBRMOLQ/Ynu7MtlkjaFJliWq7N7BEHoSEkjXByvyeOFhXinxLEGfmULFsXHI68AGTQWSsSqQ==","_resolved":"C:\\Users\\mys\\AppData\\Local\\Temp\\8fda7de4e7f38a41656b430ba5ba1814\\worker-fn-3.2.0-beta.1.tgz","_from":"file:worker-fn-3.2.0-beta.1.tgz","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-GKYrv1+SNpxFPVqBRMOLQ/Ynu7MtlkjaFJliWq7N7BEHoSEkjXByvyeOFhXinxLEGfmULFsXHI68AGTQWSsSqQ==","shasum":"c3b24240bac89ec02070ed29d51360b7f06cf3c7","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.2.0-beta.1.tgz","fileCount":7,"unpackedSize":16853,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrrX1qhKrj8FOMZcDX5zpSpUNtF89uoT65sXVtMX7npQIhAO3VfPcTsu5WL5sLe2idqN26cBzp1SX3l2eCFVXXoOu2"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.2.0-beta.1_1713686485394_0.06722863007244406"},"_hasShrinkwrap":false},"3.2.0-beta.2":{"name":"worker-fn","version":"3.2.0-beta.2","description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","type":"module","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"import":"./dist/main.js","require":"./dist/main.cjs","types":"./dist/main.d.ts"}},"dependencies":{"@mys-x/m-rpc":"^0.12.1"},"devDependencies":{"@okikio/transferables":"npm:@jsr/okikio__transferables@^1.0.2","tsup":"^8.0.2","typescript":"^5.4.5"},"scripts":{"pre":"node scripts/prepare.js","clean":"node scripts/clean.js","build":"pnpm run pre && tsup src/main.ts --format cjs,esm --dts","build:clean":"pnpm run build && pnpm run clean"},"readme":"<div align=\"center\">\n\n# worker-fn\n\n[![jsr-version](https://img.shields.io/jsr/v/@mys/worker-fn?style=flat-square&color=%23f7df1e)](https://jsr.io/@mys/worker-fn)\n[![npm-version](https://img.shields.io/npm/v/worker-fn?style=flat-square&color=%23cb3837)](https://www.npmjs.com/package/worker-fn)\n[![npm-minzip](https://img.shields.io/bundlephobia/minzip/worker-fn?style=flat-square&label=minzip)](https://bundlephobia.com/package/worker-fn)\n[![docs](https://img.shields.io/badge/docs-reference-blue?style=flat-square)](https://jsr.io/@mys/worker-fn/doc?style=flat-square)\n[![stars](https://img.shields.io/github/stars/mys1024/worker-fn?style=flat-square)](https://github.com/mys1024/worker-fn)\n[![license](https://img.shields.io/github/license/mys1024/worker-fn?&style=flat-square)](./LICENSE)\n\n[![workflow-ci](https://img.shields.io/github/actions/workflow/status/mys1024/worker-fn/ci.yml?label=ci&style=flat-square)](https://github.com/mys1024/worker-fn/actions/workflows/ci.yml)\n[![workflow-release](https://img.shields.io/github/actions/workflow/status/mys1024/worker-fn/release.yml?label=release&style=flat-square)](https://github.com/mys1024/worker-fn/actions/workflows/release.yml)\n\nEnglish | [中文文档](./README_zh.md)\n\n</div>\n\n`worker-fn` hides the complexity of communication between the JavaScript main\nthread and [Worker](https://developer.mozilla.org/docs/Web/API/Web_Workers_API)\nthreads, making it easy to call the functions defined in workers.\n\n`worker-fn` allows you to create **proxy functions** in the main thread that\ncall corresponding **worker functions** defined in worker threads by sending\nmessages. These proxy functions maintain the same function signatures as the\ncorresponding worker functions (except that the return values of the proxy\nfunctions are wrapped in Promises).\n\n![concepts](./docs/concepts.png)\n\n## Usage\n\n### Basic\n\n`math.worker.js`:\n\n```javascript\nimport { defineWorkerFn } from \"worker-fn\";\n\nfunction add(a, b) {\n  return a + b;\n}\n\nfunction fib(n) {\n  return n <= 2 ? 1 : fib(n - 1) + fib(n - 2);\n}\n\ndefineWorkerFn(\"add\", add);\ndefineWorkerFn(\"fib\", fib);\n```\n\n`math.js`:\n\n```javascript\nimport { useWorkerFn } from \"worker-fn\";\n\nconst worker = new Worker(new URL(\"./math.worker.js\", import.meta.url), {\n  type: \"module\",\n});\n\nconst add = useWorkerFn(\"add\", worker);\nconst fib = useWorkerFn(\"fib\", worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n### Using `defineWorkerFns()` and `useWorkerFns()`\n\n<details>\n\n<summary>Example</summary>\n\n`math.worker.js`:\n\n```javascript\nimport { defineWorkerFns } from \"worker-fn\";\n\nconst fns = {\n  add(a, b) {\n    return a + b;\n  },\n  fib(n) {\n    return n <= 2 ? 1 : fns.fib(n - 1) + fns.fib(n - 2);\n  },\n};\n\ndefineWorkerFns(fns);\n```\n\n`math.js`:\n\n```javascript\nimport { useWorkerFns } from \"worker-fn\";\n\nconst worker = new Worker(new URL(\"./math.worker.js\", import.meta.url), {\n  type: \"module\",\n});\n\nconst { add, fib } = useWorkerFns(worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n</details>\n\n### Using with TypeScript\n\n<details>\n\n<summary>Example</summary>\n\n`math.worker.ts`:\n\n```typescript\nimport { defineWorkerFn } from \"worker-fn\";\n\nfunction add(a: number, b: number) {\n  return a + b;\n}\n\nfunction fib(n: number): number {\n  return n <= 2 ? 1 : fib(n - 1) + fib(n - 2);\n}\n\ndefineWorkerFn(\"add\", add);\ndefineWorkerFn(\"fib\", fib);\n\nexport type Add = typeof add;\nexport type Fib = typeof fib;\n```\n\n`math.ts`:\n\n```typescript\nimport { useWorkerFn } from \"worker-fn\";\nimport type { Add, Fib } from \"./math.worker.ts\";\n\nconst worker = new Worker(new URL(\"./math.worker.ts\", import.meta.url), {\n  type: \"module\",\n});\n\nconst add = useWorkerFn<Add>(\"add\", worker);\nconst fib = useWorkerFn<Fib>(\"fib\", worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n</details>\n\n### Using in Node.js with `node:worker_threads`\n\n<details>\n\n<summary>Example</summary>\n\n`math.worker.js`:\n\n```javascript\nimport { parentPort } from \"node:worker_threads\";\nimport { defineWorkerFn } from \"worker-fn\";\n\nfunction add(a, b) {\n  return a + b;\n}\n\nfunction fib(n) {\n  return n <= 2 ? 1 : fib(n - 1) + fib(n - 2);\n}\n\ndefineWorkerFn(\"add\", add, { port: parentPort });\ndefineWorkerFn(\"fib\", fib, { port: parentPort });\n```\n\n`math.js`:\n\n```javascript\nimport { Worker } from \"node:worker_threads\";\nimport { useWorkerFn } from \"worker-fn\";\n\nconst worker = new Worker(new URL(\"./math.worker.js\", import.meta.url));\n\nconst add = useWorkerFn(\"add\", worker);\nconst fib = useWorkerFn(\"fib\", worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n</details>\n\n## Importing from JSR\n\n`worker-fn` is published on both [npm](https://www.npmjs.com/package/worker-fn)\nand [JSR](https://jsr.io/@mys/worker-fn). If you want to import `worker-fn` from\nJSR, please refer to\n[this document](https://jsr.io/docs/introduction#using-jsr-packages).\n\n## License\n\n[MIT](./LICENSE) License &copy; 2024-PRESENT\n[mys1024](https://github.com/mys1024)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.2.0-beta.2","_integrity":"sha512-Ab95lsV0T4wc0s5tkE6HE1wutN4PGcfQZI+TZ0lThOH0WfpBBmqigMdjRBExWSbA7xYOaE4NyhNBRwQRjCiOFg==","_resolved":"C:\\Users\\mys\\AppData\\Local\\Temp\\db1b7e84144dabb1812c9c30227e8a7a\\worker-fn-3.2.0-beta.2.tgz","_from":"file:worker-fn-3.2.0-beta.2.tgz","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-Ab95lsV0T4wc0s5tkE6HE1wutN4PGcfQZI+TZ0lThOH0WfpBBmqigMdjRBExWSbA7xYOaE4NyhNBRwQRjCiOFg==","shasum":"5ae8d1f709bcbed0b1d100c9774ffbae0816fb67","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.2.0-beta.2.tgz","fileCount":7,"unpackedSize":15966,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFRjWTbZ87vwIIAj0b2WZbQFqo2eGKHDsoJsm9cqAPlAIhANHjwsBb5PTXazqY1JRTDS/65zfBbEMBcDFHhl2tuit9"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.2.0-beta.2_1713689986611_0.2909223166635102"},"_hasShrinkwrap":false},"3.2.0":{"name":"worker-fn","version":"3.2.0","description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","type":"module","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"import":"./dist/main.js","require":"./dist/main.cjs","types":"./dist/main.d.ts"}},"dependencies":{"@mys-x/m-rpc":"^0.12.1"},"devDependencies":{"@okikio/transferables":"npm:@jsr/okikio__transferables@^1.0.2","tsup":"^8.0.2","typescript":"^5.4.5"},"scripts":{"pre":"node scripts/prepare.js","clean":"node scripts/clean.js","build":"pnpm run pre && tsup src/main.ts --format cjs,esm --dts","build:clean":"pnpm run build && pnpm run clean"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.2.0","_integrity":"sha512-6dR4mGgaiUyLDsE7xRlQi5Iz5PeRMkuxgD+liD4Dlh6QFbvm/A1RHVbRzhX/rMk4AinOVoexxkzkZZt2iCi7Bw==","_resolved":"/tmp/a96cca579b81b32aaf694c904258b3c9/worker-fn-3.2.0.tgz","_from":"file:worker-fn-3.2.0.tgz","_nodeVersion":"18.20.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-6dR4mGgaiUyLDsE7xRlQi5Iz5PeRMkuxgD+liD4Dlh6QFbvm/A1RHVbRzhX/rMk4AinOVoexxkzkZZt2iCi7Bw==","shasum":"a49e2f7cbd1ac3200b9f5a171dc1afa70267669a","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.2.0.tgz","fileCount":7,"unpackedSize":15959,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/worker-fn@3.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCF0VfVdt4LcR9iLJ16s+13ouZGwj9beSaknrHaUkn8+QIhAOFhXZ8AZbZ2O7NzlPaBmpuXApCFAgZ/aDTdoGAIRpWk"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.2.0_1713690811337_0.7523458991528307"},"_hasShrinkwrap":false},"3.2.1":{"name":"worker-fn","version":"3.2.1","description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","type":"module","author":{"name":"mys1024"},"license":"MIT","homepage":"https://github.com/mys1024/worker-fn#readme","repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"main":"./dist/main.js","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"import":"./dist/main.js","require":"./dist/main.cjs","types":"./dist/main.d.ts"}},"dependencies":{"@mys-x/m-rpc":"^0.12.2"},"devDependencies":{"@okikio/transferables":"npm:@jsr/okikio__transferables@^1.0.2","tsup":"^8.0.2","typescript":"^5.4.5"},"scripts":{"pre":"node scripts/prepare.js","clean":"node scripts/clean.js","build":"pnpm run pre && tsup src/main.ts --format cjs,esm --dts","build:clean":"pnpm run build && pnpm run clean"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"_id":"worker-fn@3.2.1","_integrity":"sha512-WcWqV6yFnmNAmX+jEIQxslRJ7aJUuYInmZ2f0zTVN9y85pOEg64NOK7e4RqmLAwhlu+xmB6LfD8BRcv1OFkMGg==","_resolved":"/tmp/fd2da2e7430babe103e2fe2b88638f91/worker-fn-3.2.1.tgz","_from":"file:worker-fn-3.2.1.tgz","_nodeVersion":"18.20.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-WcWqV6yFnmNAmX+jEIQxslRJ7aJUuYInmZ2f0zTVN9y85pOEg64NOK7e4RqmLAwhlu+xmB6LfD8BRcv1OFkMGg==","shasum":"a2c2d4ced42a3f9b40d70152164e93c4f31fd795","tarball":"https://registry.npmjs.org/worker-fn/-/worker-fn-3.2.1.tgz","fileCount":7,"unpackedSize":16162,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/worker-fn@3.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvpeahNYgmOJRUwIV5Ic7XF9OGZp/fDJA0zz+TIJc1VwIhAK54Xgcb5rUEge0ZC195MB1kBb0XjRPCjqjGl1Ibq50j"}]},"_npmUser":{"name":"mys1024","email":"mys.1024@outlook.com"},"directories":{},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-fn_3.2.1_1714929870364_0.6940727707103407"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-19T07:12:04.642Z","0.9.1":"2024-02-19T07:12:04.898Z","modified":"2024-05-05T17:24:30.898Z","0.9.2":"2024-02-19T07:48:47.128Z","1.0.0":"2024-02-20T14:14:38.478Z","1.0.1":"2024-02-20T14:28:24.873Z","1.0.3":"2024-02-21T03:17:24.336Z","1.0.5":"2024-02-23T09:58:07.921Z","1.0.6":"2024-02-23T10:05:01.138Z","2.1.1":"2024-02-24T10:06:36.451Z","2.1.2":"2024-02-24T10:11:12.183Z","2.1.3":"2024-02-24T10:18:29.513Z","2.1.4":"2024-02-24T17:31:58.176Z","2.1.5":"2024-02-24T17:57:45.817Z","2.2.0":"2024-02-25T11:06:57.397Z","2.2.1":"2024-02-25T11:13:37.807Z","2.2.4":"2024-02-25T12:46:59.986Z","2.2.5":"2024-02-25T13:41:36.472Z","2.2.6":"2024-02-26T03:52:12.345Z","2.2.8":"2024-03-02T21:29:54.263Z","2.2.9":"2024-03-02T21:50:13.588Z","3.0.0":"2024-03-09T17:48:14.560Z","3.0.1":"2024-03-09T18:16:18.645Z","3.0.3":"2024-03-09T20:28:06.158Z","3.0.4":"2024-03-16T21:21:59.277Z","3.1.0":"2024-03-17T14:51:02.718Z","3.1.1":"2024-03-26T14:27:49.824Z","3.1.2":"2024-03-26T14:41:53.413Z","3.2.0-beta.1":"2024-04-21T08:01:25.547Z","3.2.0-beta.2":"2024-04-21T08:59:46.774Z","3.2.0":"2024-04-21T09:13:31.489Z","3.2.1":"2024-05-05T17:24:30.531Z"},"maintainers":[{"name":"mys1024","email":"mys.1024@outlook.com"}],"description":"worker-fn hides the complexity of communication between the JavaScript main thread and Worker threads, making it easy to call the functions defined in workers.","homepage":"https://github.com/mys1024/worker-fn#readme","keywords":["web","worker","Web Workers","function","mirror","proxy","browser","Deno","node","worker_threads"],"repository":{"type":"git","url":"git+https://github.com/mys1024/worker-fn.git"},"author":{"name":"mys1024"},"bugs":{"url":"https://github.com/mys1024/worker-fn/issues"},"license":"MIT","readme":"<div align=\"center\">\n\n# worker-fn\n\n[![jsr-version](https://img.shields.io/jsr/v/@mys/worker-fn?style=flat-square&color=%23f7df1e)](https://jsr.io/@mys/worker-fn)\n[![npm-version](https://img.shields.io/npm/v/worker-fn?style=flat-square&color=%23cb3837)](https://www.npmjs.com/package/worker-fn)\n[![npm-minzip](https://img.shields.io/bundlephobia/minzip/worker-fn?style=flat-square&label=minzip)](https://bundlephobia.com/package/worker-fn)\n[![docs](https://img.shields.io/badge/docs-reference-blue?style=flat-square)](https://jsr.io/@mys/worker-fn/doc?style=flat-square)\n[![stars](https://img.shields.io/github/stars/mys1024/worker-fn?style=flat-square)](https://github.com/mys1024/worker-fn)\n[![license](https://img.shields.io/github/license/mys1024/worker-fn?&style=flat-square)](./LICENSE)\n\n[![workflow-ci](https://img.shields.io/github/actions/workflow/status/mys1024/worker-fn/ci.yml?label=ci&style=flat-square)](https://github.com/mys1024/worker-fn/actions/workflows/ci.yml)\n[![workflow-release](https://img.shields.io/github/actions/workflow/status/mys1024/worker-fn/release.yml?label=release&style=flat-square)](https://github.com/mys1024/worker-fn/actions/workflows/release.yml)\n\nEnglish | [中文文档](./README_zh.md)\n\n</div>\n\n`worker-fn` hides the complexity of communication between the JavaScript main\nthread and [Worker](https://developer.mozilla.org/docs/Web/API/Web_Workers_API)\nthreads, making it easy to call the functions defined in workers.\n\n`worker-fn` allows you to create **proxy functions** in the main thread that\ncall corresponding **worker functions** defined in worker threads by sending\nmessages. These proxy functions maintain the same function signatures as the\ncorresponding worker functions (except that the return values of the proxy\nfunctions are wrapped in Promises).\n\n![concepts](./docs/concepts.png)\n\n## Usage\n\n### Basic\n\n`math.worker.js`:\n\n```javascript\nimport { defineWorkerFn } from \"worker-fn\";\n\nfunction add(a, b) {\n  return a + b;\n}\n\nfunction fib(n) {\n  return n <= 2 ? 1 : fib(n - 1) + fib(n - 2);\n}\n\ndefineWorkerFn(\"add\", add);\ndefineWorkerFn(\"fib\", fib);\n```\n\n`math.js`:\n\n```javascript\nimport { useWorkerFn } from \"worker-fn\";\n\nconst worker = new Worker(new URL(\"./math.worker.js\", import.meta.url), {\n  type: \"module\",\n});\n\nconst add = useWorkerFn(\"add\", worker);\nconst fib = useWorkerFn(\"fib\", worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n### Using `defineWorkerFns()` and `useWorkerFns()`\n\n<details>\n\n<summary>Example</summary>\n\n`math.worker.js`:\n\n```javascript\nimport { defineWorkerFns } from \"worker-fn\";\n\nconst fns = {\n  add(a, b) {\n    return a + b;\n  },\n  fib(n) {\n    return n <= 2 ? 1 : fns.fib(n - 1) + fns.fib(n - 2);\n  },\n};\n\ndefineWorkerFns(fns);\n```\n\n`math.js`:\n\n```javascript\nimport { useWorkerFns } from \"worker-fn\";\n\nconst worker = new Worker(new URL(\"./math.worker.js\", import.meta.url), {\n  type: \"module\",\n});\n\nconst { add, fib } = useWorkerFns(worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n</details>\n\n### Using with TypeScript\n\n<details>\n\n<summary>Example</summary>\n\n`math.worker.ts`:\n\n```typescript\nimport { defineWorkerFn } from \"worker-fn\";\n\nfunction add(a: number, b: number) {\n  return a + b;\n}\n\nfunction fib(n: number): number {\n  return n <= 2 ? 1 : fib(n - 1) + fib(n - 2);\n}\n\ndefineWorkerFn(\"add\", add);\ndefineWorkerFn(\"fib\", fib);\n\nexport type Add = typeof add;\nexport type Fib = typeof fib;\n```\n\n`math.ts`:\n\n```typescript\nimport { useWorkerFn } from \"worker-fn\";\nimport type { Add, Fib } from \"./math.worker.ts\";\n\nconst worker = new Worker(new URL(\"./math.worker.ts\", import.meta.url), {\n  type: \"module\",\n});\n\nconst add = useWorkerFn<Add>(\"add\", worker);\nconst fib = useWorkerFn<Fib>(\"fib\", worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n</details>\n\n### Using in Node.js with `node:worker_threads`\n\n<details>\n\n<summary>Example</summary>\n\n`math.worker.js`:\n\n```javascript\nimport { parentPort } from \"node:worker_threads\";\nimport { defineWorkerFn } from \"worker-fn\";\n\nfunction add(a, b) {\n  return a + b;\n}\n\nfunction fib(n) {\n  return n <= 2 ? 1 : fib(n - 1) + fib(n - 2);\n}\n\ndefineWorkerFn(\"add\", add, { port: parentPort });\ndefineWorkerFn(\"fib\", fib, { port: parentPort });\n```\n\n`math.js`:\n\n```javascript\nimport { Worker } from \"node:worker_threads\";\nimport { useWorkerFn } from \"worker-fn\";\n\nconst worker = new Worker(new URL(\"./math.worker.js\", import.meta.url));\n\nconst add = useWorkerFn(\"add\", worker);\nconst fib = useWorkerFn(\"fib\", worker);\n\nconsole.log(await add(1, 2)); // 3\nconsole.log(await fib(5)); // 5\n```\n\n</details>\n\n## Importing from JSR\n\n`worker-fn` is published on both [npm](https://www.npmjs.com/package/worker-fn)\nand [JSR](https://jsr.io/@mys/worker-fn). If you want to import `worker-fn` from\nJSR, please refer to\n[this document](https://jsr.io/docs/introduction#using-jsr-packages).\n\n## License\n\n[MIT](./LICENSE) License &copy; 2024-PRESENT\n[mys1024](https://github.com/mys1024)\n","readmeFilename":"README.md"}