{"_id":"worker-handler","_rev":"39-5a1f1a02799cc25024a11ed5326c5af8","name":"worker-handler","dist-tags":{"latest":"0.2.12"},"versions":{"0.1.0-alpha":{"name":"worker-handler","version":"0.1.0-alpha","keywords":[],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.0-alpha","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"dist":{"shasum":"0c94ce29cb7efc407ecdd67babb0c6b54c8520b2","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.0-alpha.tgz","fileCount":5,"integrity":"sha512-joNcqoDxnMG26MDs6rKoz+BPsDNIfXSAJnDF85JnnV22D2ZQY2vlcgKWhKIL3i8JW6ru08gagh5K0LJVhqP2uA==","signatures":[{"sig":"MEYCIQDEAGPTtU/RlNPgXhu4pGmdwg/v1s4pYgFczrN5RzRIHwIhALwPjPU3Gtc4KK1DV6KanCKRaUsv0IF7bbaeTNExgL34","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8534},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./types/worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"851918d3aeb3c8c04d880748ea2294105775b69d","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"deprecated":"deprecate","_npmVersion":"10.2.4","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.0-alpha_1714847932011_0.9768554625239063","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"worker-handler","version":"0.1.0","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.0","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"8c2d5736c4405b8699228028724837c0e0ab4326","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.0.tgz","fileCount":5,"integrity":"sha512-EqHDSilAT914GSPMHBVcVLHssYnWyo22HRxXWbaExNSEeam1JLcp95gXg6Fme+3gA3r76MHDMj/pJoxiipwvKw==","signatures":[{"sig":"MEQCIFOHVXeyrY1jVv9VF83TpyU4R6nIPftBqNa1VspzGQ07AiAR3O5HR5n/+ffHR1420sXKfsOZb5uGntV4gZVSDsJ31A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10812},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"64edafd37223729e19f3d0362c21b0548cc7deaf","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.0_1715183430244_0.9129970808979873","host":"s3://npm-registry-packages"}},"0.1.1-alpha":{"name":"worker-handler","version":"0.1.1-alpha","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.1-alpha","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"f008e546d42e88d2faf6f05f606e4bd43313a697","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.1-alpha.tgz","fileCount":7,"integrity":"sha512-9EmoZUB41W+XdpKYufeOyuDLOh/iwyHYdffMwrnUxXEw89E0mJK6EHpaTCTjKqUz+F+pgdQvvwZ4FYOLTWHa/g==","signatures":[{"sig":"MEUCIQDBsaBgmxevoU7GjmJ11UzE84E2JLiosd4B61KPk4qcFQIgVeLwbeVEi6ykxIcqFt+XkFfcQi5tYvqNOs+7A+8NyM4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45013},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"64edafd37223729e19f3d0362c21b0548cc7deaf","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"deprecated":"deprecate v0.1.1-alpha","repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.1-alpha_1715184333925_0.9297541930345674","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"worker-handler","version":"0.1.1","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.1","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"10467268f4cfd0d12bc499c587038d2d332d77b0","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.1.tgz","fileCount":6,"integrity":"sha512-TlvpjZc8WK2nAswMl1USON9OpGjLLfjI0jS7DK+wPWsy7WXqD8gf2hwT3RqQ/6yuCSR/CA1XKcDMwRR0DSmEJA==","signatures":[{"sig":"MEUCIDxnYB1UqlGVupqr0sGgbdGhIfMZNb6dbgV3w/5TWA+fAiEAjYTSeg0a7zihtqeSOAngA+DlRQgbVA3a7aTyNSedqrQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28544},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"880a861c59a2edf07fdd3645e7b3c3390bb9567c","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.1_1715185733578_0.8944036323380093","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"worker-handler","version":"0.1.2","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.2","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"5c16dd19b4efeed9698ab3dd47c518414a805e93","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.2.tgz","fileCount":6,"integrity":"sha512-A0dHibtxy55+TRW5fbBytwd9wOFSVjCoN2mNqFCSR3cPu3AWe7s2HPPp9/80hNH69pjUDo+IdV3CZCJIMfTPWw==","signatures":[{"sig":"MEUCIQCJIGAnWK/AlUQShLxQHyTBHt/lZBJpnuhNlC4MdHNeTgIgSg7klwUJWYvIMiMtMof4ysD0imj5lsuN5nzBnbNKUlY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29015},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"93940f2a6da63d7bf5decafec1db78f5aae34dc5","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.2_1715670220028_0.235020320166486","host":"s3://npm-registry-packages"}},"0.1.3-alpha":{"name":"worker-handler","version":"0.1.3-alpha","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.3-alpha","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"c55ee17f731b63f3bfe38d9bb94bb41bcb0c3fa6","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.3-alpha.tgz","fileCount":6,"integrity":"sha512-0BGf9pV7iFhdg+3OAW9t5wym+2PU/IdsOr30AezNWdztOmB9D/FfY9l3+//BadJJY5qjYsFp4GFdrMC/qjh9PA==","signatures":[{"sig":"MEYCIQC1xzEWxYVT73YOmcfrd/PPu/oU4oMvnk/Z2Iy6Wf2ueQIhAKU8dn+yfULtZPvg5DFd82g+fitZV6ShLNlf5YkRmWxE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28862},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"c24f9d0a28f79678d926487f75cdce6ca945d35f","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"deprecated":"deprecate","repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.3-alpha_1715859233106_0.19962723301439245","host":"s3://npm-registry-packages"}},"0.1.3-alpha.1":{"name":"worker-handler","version":"0.1.3-alpha.1","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.3-alpha.1","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"7b1af7e084b0b5ae5c63bf8962dfe526d65e9eb0","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.3-alpha.1.tgz","fileCount":6,"integrity":"sha512-eN+yUVgU2s8hPH5zvK8C3M4g+keyurttCyzdkqcZY+1Ig1O3tT8zPfWRtG0GgB6EQY+P/MmU7oYMNAN5Kgs7Bg==","signatures":[{"sig":"MEUCIApPe8oCsnaHTo9SnD09rUsxQ6gaE6Osh56NF2ZRNzhKAiEAgl/PkUKFdkj4BdUc3pCd5rTANMqImMKuFB7RG9Qvdts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28885},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"c24f9d0a28f79678d926487f75cdce6ca945d35f","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"deprecated":"deprecate","repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.3-alpha.1_1715862334302_0.6563353557762717","host":"s3://npm-registry-packages"}},"0.1.3-alpha.2":{"name":"worker-handler","version":"0.1.3-alpha.2","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.3-alpha.2","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"e1e5776e775232bfe6152b1cc26ae5242fcd1816","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.3-alpha.2.tgz","fileCount":6,"integrity":"sha512-OwZpiEWN/OV55vWkh+6kC5S7S2OWcRiwCM84V8eYNVIKQ/ig7bxmmtNBm6GbZv+6Jv3LDJdLszhEOeWTeJDmRQ==","signatures":[{"sig":"MEUCID4uaxyF4DwMIeHlEK0cI1cV0xVoIB3jN3FH5VGpA/MXAiEAo1mYoSTy7CQ0kSi8Cwuy7kIPNWEUS5mS7W+1HfwUz0o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28864},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"c24f9d0a28f79678d926487f75cdce6ca945d35f","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"deprecated":"deprecate","repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.3-alpha.2_1715864237883_0.2970863954949834","host":"s3://npm-registry-packages"}},"0.1.3-alpha.3":{"name":"worker-handler","version":"0.1.3-alpha.3","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.3-alpha.3","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"f00a64272e967d6605a178db827d5d43c93c5347","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.3-alpha.3.tgz","fileCount":6,"integrity":"sha512-GQUnKSghOl5Nz5niMm6cLixqGWWEsvvWgC3DbzGlzauQ39dUVRYw5P+nXw0Q9SiTgrHnEWsZKVEiS96meFXNTw==","signatures":[{"sig":"MEUCIQDrOsesNa9fiaLir/hNzEcyBIU84dr9qBJxADO191yEigIgSWd0Q+7sJt/q48VyZoouCJDUfxZj+SmsI6C/0Z98N3s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28920},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"c24f9d0a28f79678d926487f75cdce6ca945d35f","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"deprecated":"deprecate","repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.3-alpha.3_1715874986046_0.9634971494826818","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"worker-handler","version":"0.1.3","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.3","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"a5c12c8c5092f8a0bbdb0baf52eff8853ee4a8cd","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.3.tgz","fileCount":6,"integrity":"sha512-ZLU50YwTtkn5WLQrMleYHi3XkiUJuVms+qXJ3u+VMjL/iOIcnlatuxloHotsPPk6Z7IjDZza7KSuVdcs1PatdA==","signatures":[{"sig":"MEYCIQDp1w8Kb+JwndI17o/d+kXB7n7F4htdXVyqvPabGU1l4AIhAJIY5GKKWO7i9dQEba1b4BUpr0UaiWEytr4I/YvelKZR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28906},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"c24f9d0a28f79678d926487f75cdce6ca945d35f","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.3_1715880559915_0.08403500176244116","host":"s3://npm-registry-packages"}},"0.1.4":{"name":"worker-handler","version":"0.1.4","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.4","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"39c4c9aaa3196c0dbc8de181fc5c194acb83c9e5","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.4.tgz","fileCount":6,"integrity":"sha512-H/HJC1MJxK5g1Zf/H6VjujC2SPEgDnlIWQkuWqP1PJQeBte6Z/uuqPf1YbBYlkGh+bPT8gUV0+iBgFekjAgdHg==","signatures":[{"sig":"MEUCIQD+m39Gckk4SNJh471xmdsVsqHZKXY6TMzlkQg4zJnbjAIgfQlWdKEVrTIoJ+1kAFjHKvD3JafSoyRFgg0gxbd98e8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28904},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"25a181e695efc9208524f242bcfdc5edf9f14f99","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.4_1715954574250_0.24935242148709036","host":"s3://npm-registry-packages"}},"0.1.5":{"name":"worker-handler","version":"0.1.5","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.5","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"3548716029f54f4fa79dd8568aae389dff4205ad","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.5.tgz","fileCount":6,"integrity":"sha512-vByxI7mo3ommaOwpI75+SMbfDT+MH8kJK4oxYhzBHodUk7Jtg2Q65VyXGLrYUvvQb78tCfs43sxDz3pDyXqFOg==","signatures":[{"sig":"MEYCIQD6smciOK0fqYdICPSEPwfB7hXnxqGmYB1tlI3jVaq0vAIhAL26SelbFKP/3cZPCglvF3dpZipbnZ3MGB+sjjo5dUsO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30994},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"3dc530c78546cc517c36f08dec737c08b3fc68a0","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.5_1716033405293_0.18416843107486014","host":"s3://npm-registry-packages"}},"0.1.6":{"name":"worker-handler","version":"0.1.6","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.6","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"0e1d3074fff3e3d9647d117b6d8960772599f0e4","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.6.tgz","fileCount":6,"integrity":"sha512-I1tWl2crQLPRGxjBSGJJqilpVsFwQWqWzKnBfGhbUMDDcgy163NVp7VKQ/2zZmeHwV3lJTWFq6KNbtBwkQDTKA==","signatures":[{"sig":"MEUCIQCjEiz/psMcI8H9N2GBpttgUNBVHmf8USSYPmZdUZbHqwIgFrs0Lkho9kl7sxq6Sw/KTvrGMCgPcfiVuDO8/hA4qwM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31182},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"15feee7c8bb9ceaefd7c868770db87ac7b9c28e4","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.6_1716373918991_0.8416517435583046","host":"s3://npm-registry-packages"}},"0.1.7":{"name":"worker-handler","version":"0.1.7","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"ISC","_id":"worker-handler@0.1.7","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"b2b66cc819f08813956feca12dc5c6f6626a7ddf","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.7.tgz","fileCount":7,"integrity":"sha512-zc5oQcma9LrFJn4kHPYPgpUl2AMaJA0Xd1fYOK4Cqxte+eLVjSTkivMCDuSOyqV7Ey6exTX2ZYfpVTKfKymZ5g==","signatures":[{"sig":"MEUCIES3A3K4XI6IhL07tHxmxUChCllnVuEZPugk+nylMzPgAiEAvi252IlS9ynz8U3CD0uMPiTdnuQTUvV4Q8p0C9kV03s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33752},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"a093c6ffd3d382f756fff8357298babe0918c957","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.7_1717101946842_0.9823508594132921","host":"s3://npm-registry-packages"}},"0.1.8":{"name":"worker-handler","version":"0.1.8","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.1.8","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"6aeaf4789771d7d9402fb8751f77bd7ad5422f8c","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.8.tgz","fileCount":7,"integrity":"sha512-g3zIh9kpAeBEjm+dbgi77sA+pS03v6Zr4Y0Tl93qjl73qjFxDLEkBv2VvHfqrGnGgInCrk6+4P773nGHU5mYEg==","signatures":[{"sig":"MEQCIEOSidUaQQCltYef28I1n7KYUemGqfmJi/JP6wCQ1bVLAiAkDF2YpmeUvZaHRNufv6dT4xi0dzLfDPKZTzHWM7BttA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33752},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"59c99c697fc2886f86eae28cf8926e6d301a3bfb","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.8_1717148723653_0.9693221076096425","host":"s3://npm-registry-packages"}},"0.1.9":{"name":"worker-handler","version":"0.1.9","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.1.9","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"f235c2031ca23880fe5fb819859e86a0ae545786","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.9.tgz","fileCount":7,"integrity":"sha512-LHqncRH8rH1fmjVdOEAVd4vuJn6470HRnafUsfEedNzhl6MApMnDKgF9t+38JRhJXJ9wwRIIrkle5ZOmdp2r9Q==","signatures":[{"sig":"MEYCIQCZ2xgawK9TR5osiIjjonb/oR0p6UvLYXOgeRJ3XwzQrwIhAMlCiKKKGH44KP4MhKOwpiowFDrI6hFJSKEC+g8ydCpz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34175},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"c497ed796082f043655f33926cff44f831b02f15","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.9_1717291513802_0.25482395693450166","host":"s3://npm-registry-packages"}},"0.1.10":{"name":"worker-handler","version":"0.1.10","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.1.10","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"b8b82c8d1475afa94412069ddd9daf6a5d98ab97","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.10.tgz","fileCount":7,"integrity":"sha512-9xPsijnpYibSzfdZaX85LaVrU2It3qJPRaa2xnaEBBxTHl+buafmbWiOfsPNdb37MC1GJ2SaO9C5JO1ekjxz/g==","signatures":[{"sig":"MEYCIQDKLEUC+gDXVBI5PwYU7s94Sj8mvm+D8jlZBFIjKzDt6QIhAIQCUrSj0PqbidzggP3LDGD39KUEKFM3Ie/7yy9bbe24","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35037},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"8db72431c7f55c4d219ffaba520512a906dde17a","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.10_1717322282766_0.6630647320304031","host":"s3://npm-registry-packages"}},"0.1.11":{"name":"worker-handler","version":"0.1.11","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.1.11","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"66fa113dc539c115cb6f092cbfbd8e7293cf90d6","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.11.tgz","fileCount":7,"integrity":"sha512-eW343P9X+FcxAxm2GFsvT6lxJghc/AK/qYk1g7HIg0q1IrKiLDADeEAAejKGsGXykCUC852QteRjU1B4rjkzRA==","signatures":[{"sig":"MEYCIQCrBNq+Ai3DIjqGxJTZE02mObtR07tV3zIetMxJxsM4BwIhAMZesSKNdP6yQb1e2t3UMeVPoPIuKebJv0OV5CvNCNMK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35624},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"4e84e261e9efc899e2c47f02bf666496fb0b9aac","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.11_1717854784724_0.9904040231165478","host":"s3://npm-registry-packages"}},"0.1.12":{"name":"worker-handler","version":"0.1.12","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.1.12","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"5f521c63d245376edddb3a39f2667e36d8b0add3","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.1.12.tgz","fileCount":7,"integrity":"sha512-AGre88aDDeDOZ5vky66Os0VxFy1WvWZJq41ED3o5OYdty5ZlTDBiTKNsh6QThPf1EfAH6t6R9nFIE96P/ZzE2Q==","signatures":[{"sig":"MEUCIQDRm/1dS5VwgJKZsSNjB99FqF8jsVyIDIi4xTtB8DtXhgIgCXnpAElE3SC9cnJ0QovlXiEwsj3Dy4hpJi99RSndNPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35312},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"79cba8120877c08c59553e093f9f122fc0b83c27","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.1.12_1717868430616_0.39302897093014466","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"worker-handler","version":"0.2.0","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.0","homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"f9692559ee7519a0c8d5f1720abfa1df2f0d7990","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.0.tgz","fileCount":7,"integrity":"sha512-QTdSekH+2ADP8x5HRty3hLVAAa5ly5dBGf14jkjz/PHT3H3WpAS+JKbRLLnalVSBe1+vdlj3OqPAlGzJFxIo1Q==","signatures":[{"sig":"MEUCIQDkMkb7c2nNJLiq4bGIoC9ssuMcWUB8dCvQgKdiVl5snwIgDe2H4rqdDufMAgDmNs5N3+vmtyRMoq1bPNdyTQ49qPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51794},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"346aea6c115e0602a7ebaf016e97101777052586","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.0_1719410448452_0.4244920965501575","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"worker-handler","version":"0.2.1","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.1","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"10cac448f8bbf0fe8c2338a0e4231b48c3f28e31","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.1.tgz","fileCount":7,"integrity":"sha512-V3tZXr4nHbvIdttYJU3ZcNRX67etP+ceFXwB/1fRkWsCFK4inH9MroqQAUN0JaMYvRoQpVfVBWn4/e4vO7RZeQ==","signatures":[{"sig":"MEUCIQDxq0zUK8khjfyQ7QtZxJV306Ze07fszn4BlaK9RH8XdgIgOhpSTcdJZZxX5xqCeEqnzN1izlqOshA7gC0jlgrhImo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65008},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"c4230bb455db741964e7beacd7f115893d3b7959","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.1_1720331791607_0.9991034568760075","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"worker-handler","version":"0.2.2","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.2","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"f643b720253d6662beae5d485b11db3babb64510","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.2.tgz","fileCount":7,"integrity":"sha512-1dARYzn0Fm/elpZ3VZCTRBg8DxZSNGpp2ohf1+y7JIjnjHGfCyYWNmGxLN3uRNo6hdw75Zvv8cNog0BLPmIPIQ==","signatures":[{"sig":"MEQCIGK5/gqFiHCjK7hJKrq+yOd22M4XmmYGfV4Q0OWnBCl/AiAJ9ajr9LxG05TEzfeIUcjgo03AB8QHdrwgDKxQ40s+4w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64942},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"25ec70b0360c7ad6af323218527fe48a7f2516fa","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.2_1720507779987_0.23084479206114095","host":"s3://npm-registry-packages"}},"0.2.3":{"name":"worker-handler","version":"0.2.3","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.3","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"df283e7636f6a662282261198c9acb289da2da36","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.3.tgz","fileCount":7,"integrity":"sha512-lwvt7eXJ8davCTmZt9mOnTuIbtSVbeegiHhtwG1lr//g71ohYBHuaabeI9V1cRUvJOhcHG8RhAlWOyBIs6F3MQ==","signatures":[{"sig":"MEQCICZi8gESGi25m4r2yW8Se4TP4bga1UU9Z0VVtTfqeMH5AiAuRbjMu8mykanYUH/gKoB+VNe6MwP+eiuna6MgMjK6uQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66785},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"5b2a66261836d844443dcbd86457114a559ddc03","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.3_1720795697257_0.8456370832236453","host":"s3://npm-registry-packages"}},"0.2.4":{"name":"worker-handler","version":"0.2.4","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.4","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"e018a13d653124633ecd9b884f6eb430bab253e5","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.4.tgz","fileCount":7,"integrity":"sha512-GxgdX8xGkuFEHiPSlt1FhslyePvBsXKIeWXyRg715H7zmr51WKn5cw03MRBvHZQB7VI+lGRMfI/aKQjwQnKE5Q==","signatures":[{"sig":"MEYCIQCFj5ncM/6PALxKjRlWfuz4ITQvF5Q1FwCarH39dehI0QIhAJEpqSahuhOeYZhDqycqzAsJ9km047lvOnXct2atJoul","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":88490},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"ca431a9ae7120e73a961a018bc5e13850415f95e","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.4_1721735691547_0.19362100528434212","host":"s3://npm-registry-packages"}},"0.2.5":{"name":"worker-handler","version":"0.2.5","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.5","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"c3bf8d043e4ee25d75176cae5524bcc9d450c60d","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.5.tgz","fileCount":7,"integrity":"sha512-5rQLBDZi7w+ZZfAQilEfwBMM/gEIfilJw04XNeVVxuWp9K3NJ4kvEyE3WRzDubcbNYTWhvHqThwpECUBQ0pR8Q==","signatures":[{"sig":"MEUCIQDLyWGtoXVioTDygZHttBx9kyGdFbfbU+H7C7tkYkvsdgIgD9tURapKjFg1O0XeLglUnDXoA5bjE/O7euPh9dd4F78=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":103893},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"3207b79fe27bba46a1f3b81a8fe9f67e9b9c35dc","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.2.4","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.5_1722263947988_0.19457683991615426","host":"s3://npm-registry-packages"}},"0.2.6":{"name":"worker-handler","version":"0.2.6","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.6","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"433e6ad4d8f681013056cd96d14da07ccdb09581","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.6.tgz","fileCount":9,"integrity":"sha512-igpwni8HhZQtkT1NLq0tok1UoeyIcKc8UfAACWexp2XS1tTMNgPZdm2rYPEWqmFgi/g+A6pKL6hijLxfLPaATQ==","signatures":[{"sig":"MEYCIQCLI6XpvbuQFnVRyvcsyfKxFf1ilHsAsLMt64/kN1rfgwIhAPGitp90De2vMQkXSHHv9EdoTihklJTtR3p6nl29GYI1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":107928},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"3b3247f63274d1c285a9ec720b1f5ffd4675a599","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.8.2","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.6_1728379087816_0.9498270873014532","host":"s3://npm-registry-packages"}},"0.2.7":{"name":"worker-handler","version":"0.2.7","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.7","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"32f5181786d1e5d6e88e6755a0ecc52922907025","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.7.tgz","fileCount":9,"integrity":"sha512-T3wekGUaGqpDXnSGz2+DO0IviZBRAq8GMDxtG6zlA6dRpjGnKcnXdptZdc8lBVrn8xJV/wHcVRYsp32z8lAkzw==","signatures":[{"sig":"MEYCIQD+jtF5X1j/CLdlOIwcx4/ZSpX/NxOmlYtWYoqaRDZvdAIhAKHf5Egg8mD9HyLLj6iVGsFve6rxiwMWoSR2f77bYUox","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":107930},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"031ccf2b27fe27839ba805f5d66873d5941f2c9f","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.8.2","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.7_1728392846966_0.7102771617657286","host":"s3://npm-registry-packages"}},"0.2.8":{"name":"worker-handler","version":"0.2.8","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.8","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"6eb23a394713c6d751078483177d4626f6814faa","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.8.tgz","fileCount":9,"integrity":"sha512-Yd/EvzMTeNyicKOy8JTfh9tCz7cfth3DO27wSmpP/in/hUdGOkpgbJNByPLxar0DbDDaMOB2Pev4tkmfg09ogQ==","signatures":[{"sig":"MEUCIQCQ8Y+odfTVU+lCH5ptWnWxFe2tE5cZohLyfrlUxDlRLwIgEmhWloiNnNHZPA5T1WBE3wLp0UfDCbOciBPFx4ti29E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":107937},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"887cdf128cf4f634a3144c2a3976311ee6fa5357","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.8.2","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.8_1728626802028_0.3015010098135873","host":"s3://npm-registry-packages"}},"0.2.9":{"name":"worker-handler","version":"0.2.9","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.9","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"d34417b0cf51fa3ff8f25d41b751de9a0e2aeafb","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.9.tgz","fileCount":9,"integrity":"sha512-73hNTvoAA9egwv0wX32L+TwBbk4F67qa0PvxsQSjJ3JVOHn00igakrqkQldx3SriIS6FY3mqwfE5KGMWU4ORHw==","signatures":[{"sig":"MEQCIEo2sq93l/aVirXPdUbeumNwGwf8rNRosXzsfYMz9raTAiBjLcuOy0ULHaJMl7KnKHH5sxPEGSwZ+NR71FNW/KxGog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":107935},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"9fde9267d78189ef9a78d16bae0d1ef276b1c0da","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.8.2","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.9_1728982910673_0.8846454324868254","host":"s3://npm-registry-packages"}},"0.2.10":{"name":"worker-handler","version":"0.2.10","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.10","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"381ef1d3c44016d6507b3176e1cc4e1425f73b12","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.10.tgz","fileCount":9,"integrity":"sha512-IFusec0mgXf23DpzNnY7SSOT9+kl3n4+CaJ3+Kbz9u6SaSMzSas8OuBzFoVALLYoFHmWCHVHV/gmgdeMik6W7w==","signatures":[{"sig":"MEYCIQC0Q/Z8Kjv/eSoYmtzj+EdcPgXZLDvPAgICPEFxr2EaVQIhAIL/igXsLeNcunoHwu0EK1wsKIdWaqBNdKqEWISQskrA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109942},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"aeef533ac3d28fd741900d32dd6566ac7d0f1063","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.8.2","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.10_1729620806363_0.7036520420178287","host":"s3://npm-registry-packages"}},"0.2.11":{"name":"worker-handler","version":"0.2.11","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.11","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"homepage":"https://github.com/zzc6332/worker-handler#readme","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"dist":{"shasum":"ce087b09f427055c2335b1f00cb03d978f9b8fd4","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.11.tgz","fileCount":9,"integrity":"sha512-YER/g9oT7oSYjI3o9znrCsVdTZRJwwP2eCgHnLg2ZdQCyEGi0iCRdlsX0vaDYn/jrkbteg2NE3Gl8DE7Ny8CCg==","signatures":[{"sig":"MEYCIQD15lpdU6MpNMe+4SKg8uhYhd3EMoGykpkAvkRegO0FsgIhAMJxd+w3lsQgy7T2enz8rigNO0P1H+FqNqeUu25+oonJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110001},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"gitHead":"c847a16b17e6d4cf2d18cbab7e40b6dc8cef483b","_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"repository":{"url":"git+https://github.com/zzc6332/worker-handler.git","type":"git"},"_npmVersion":"10.8.2","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/worker-handler_0.2.11_1729625613286_0.24170089935043837","host":"s3://npm-registry-packages"}},"0.2.12":{"name":"worker-handler","version":"0.2.12","description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","repository":{"type":"git","url":"git+https://github.com/zzc6332/worker-handler.git"},"exports":{".":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./main":{"types":"./main.d.ts","import":"./main.js","require":"./main.js"},"./worker":{"types":"./worker.d.ts","import":"./worker.js","require":"./worker.js"}},"keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"author":{"name":"zzc6332"},"license":"MIT","_id":"worker-handler@0.2.12","gitHead":"27db0b5681f091d3e7de42605b3301c181b9d132","bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"homepage":"https://github.com/zzc6332/worker-handler#readme","_nodeVersion":"22.8.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-EefHImWUw2CwMkafJ27WldMq0HJRHv+sxqLD6/MESEf9h/I2DnVmg8aFLMmnJg6BEmExtJeDTbGh68n4Pp2HFA==","shasum":"eb59b7f7bdb23cf0dcdf3a0b50dea1a587c74143","tarball":"https://registry.npmjs.org/worker-handler/-/worker-handler-0.2.12.tgz","fileCount":9,"unpackedSize":110024,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCu1W/iWAOY/LeLtImpku3Cm9D78NIkwah3/Cy+D/ORxwIhANUzzaoAlP5Xx7+JSIDj4UxBVRsI+N26J3ucM3Tssdls"}]},"_npmUser":{"name":"zzc6332","email":"zzc6332@foxmail.com"},"directories":{},"maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/worker-handler_0.2.12_1729714960745_0.5888812367090981"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-04T18:38:52.011Z","modified":"2024-10-23T20:22:41.173Z","0.0.1":"2024-05-03T03:41:31.482Z","0.1.0-alpha":"2024-05-04T18:38:52.182Z","0.1.0":"2024-05-08T15:50:30.399Z","0.1.1-alpha":"2024-05-08T16:05:34.096Z","0.1.1":"2024-05-08T16:28:53.750Z","0.1.2":"2024-05-14T07:03:40.212Z","0.1.3-alpha":"2024-05-16T11:33:53.276Z","0.1.3-alpha.1":"2024-05-16T12:25:34.494Z","0.1.3-alpha.2":"2024-05-16T12:57:18.043Z","0.1.3-alpha.3":"2024-05-16T15:56:26.309Z","0.1.3":"2024-05-16T17:29:20.094Z","0.1.4":"2024-05-17T14:02:54.433Z","0.1.5":"2024-05-18T11:56:45.446Z","0.1.6":"2024-05-22T10:31:59.143Z","0.1.7":"2024-05-30T20:45:46.991Z","0.1.8":"2024-05-31T09:45:23.823Z","0.1.9":"2024-06-02T01:25:13.974Z","0.1.10":"2024-06-02T09:58:02.970Z","0.1.11":"2024-06-08T13:53:04.896Z","0.1.12":"2024-06-08T17:40:30.787Z","0.2.0":"2024-06-26T14:00:48.612Z","0.2.1":"2024-07-07T05:56:31.741Z","0.2.2":"2024-07-09T06:49:40.151Z","0.2.3":"2024-07-12T14:48:17.443Z","0.2.4":"2024-07-23T11:54:51.753Z","0.2.5":"2024-07-29T14:39:08.182Z","0.2.6":"2024-10-08T09:18:08.000Z","0.2.7":"2024-10-08T13:07:27.193Z","0.2.8":"2024-10-11T06:06:42.337Z","0.2.9":"2024-10-15T09:01:50.915Z","0.2.10":"2024-10-22T18:13:26.782Z","0.2.11":"2024-10-22T19:33:33.513Z","0.2.12":"2024-10-23T20:22:40.987Z"},"bugs":{"url":"https://github.com/zzc6332/worker-handler/issues"},"author":{"name":"zzc6332"},"license":"MIT","homepage":"https://github.com/zzc6332/worker-handler#readme","keywords":["worker","Web Worker","threads","javascript","typescript","front-end"],"repository":{"type":"git","url":"git+https://github.com/zzc6332/worker-handler.git"},"description":"Worker-handler provides a convenient capability for posting messages between the Main thread and the Worker thread when using Web Worker in javascript or typescript.","maintainers":[{"name":"zzc6332","email":"zzc6332@foxmail.com"}],"readme":"# worker-handler\n\n<div style=\"text-align: center;\">\n    <span style=\"font-weight:bold;\">English</span> | <a href=\"./README-zh_CN.md\">简体中文</a>\n</div>\n\n## Overview\n\n`Worker-handler` provides a convenient capability for posting messages between the `Main` thread and the `Worker` thread when using `Web Worker` in javascript or typescript.\n\nThrough `worker-handler`, in `Main`, messages can be posted to and recieved from `Worker` just like network requests. `Actions` for handling these \"requests\" can be defined within `Worker`. There are two ways to obtain \"responses\": they can be acquired through `Promise`, which is similar to [AJAX](https://developer.mozilla.org/en-US/docs/Glossary/AJAX), or through `EventTarget`, which is similar to [Server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events), and both ways of response can be used simultaneously in the same request.\n\n## Quick Start\n\n### Install\n\n~~~sh\nnpm install worker-handler\n~~~\n\n### Basic Usage\n\n<span id=\"basic-example\">The following example demonstrates the most basic usage of `worker-handler`:</span>\n\n~~~javascript\n// demo.worker.js\nimport { createOnmessage } from \"worker-handler/worker\";\n\n// Call `createOnmessage` with `Actions` to get the `onmessage` callback of worker.\nonmessage = createOnmessage({\n  // Defining the `Action` with a async function is recommended if only responsing messages by `Promise`.\n  async someAction() {\n    // Any asynchronous process can be excuted in Actions.\n    ......\n    // The value returned in the asynchronous `Action` will be posted to Main as the response message through `Promise`.\n    return \"some messages\";\n  }\n});\n~~~\n\n~~~javascript\n// demo.main.js\nimport { WorkerHandler } from \"worker-handler\"; // It can also be imported from \"worker-handler/main\".\n\n// import workerUrl from \"./demo.worker.js?worker&url\"; // in vite\n\nconst demoWorker = new WorkerHandler(\n  // Pass an instance of Worker as the first argument.\n  new Worker(new URL(\"./demo.worker.js\", import.meta.url)) // In webpack5, create an instance of Worker in this way.\n  // In Vite, you can pass the above `workerUrl`, WorkerHandler will convert it into an instance of Worker.\n);\n\n// Request `Worker` to execute someAction.\ndemoWorker.execute(\"someAction\", []).promise.then((res) => {\n  // Receive the message responded through `Promise` from the `Action`.\n  console.log(res.data);\n}).catch((err) => {\n  //  Errors occurring in the `Action` will cause the `Promise` to be rejected.\n  console.log(err)\n});\n~~~\n\n## Typescript\n\n`Worker-handler` can be used with type supports in typescript. Once the type of `Action` is defined, it enables type detections and hints at both the posting and receiving ends when passing messages between `Main` and `Worker`.\n\n<span id=\"ts-example\">The following is a simple example of using `worker-handler` in typescript:</span>\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler-test/worker\";\n\n/*\n * Define the types for `Actions`, which will subsequently be passed as generic parameters in two places:\n * - When using `createOnmessage()` in `Worker`.\n * - When using `new WorkerHandler()` in `Main`.\n*/\nexport type DemoActions = {\n  // Define an `Action` named `pingLater`, whose return type `ActionResult<string>` indicates that this `Action` can pass a message of string type to Main.\n  pingLater: (delay: number) => ActionResult<string>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  // After being called, `pingLater` will pass the message to Main after `delay` ms.\n  async pingLater(delay) {\n    await new Promise((resolve) => {\n      setTimeout(() => {\n        resolve(null);\n      }, delay);\n    });\n    return \"Worker recieved a message from Main \" + delay + \"ms ago.\";\n  }\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { WorkerHandler } from \"worker-handler/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\ndemoWorker.execute(\"pingLater\", null, 1000).promise.then((res) => {\n  console.log(res.data);\n});\n~~~\n\n## Call `Action`\n\nCalling `excute()` of a `WorkerHandle` instance in `Main` will create a connection with `Worker` and call an `Action`.\n\nThe parameters received by `excute()` from the third one onwards are all `payloads`, which will be passed to the target `Action` in `Worker` in order.\n\nThe second parameter is an object that specifies connection configuration options, which contains two properties named `transfer` and `timeout`:\n\n- The value of `transfer` is an array of [transferable objects](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) that will have their ownership transferred to the `Worker`,  used to specify the `transferable objects` in `payloads` that need to be transferred.\n\n  If the value of `transfer` is `\"auto\"`, then the `transferable objects` in `payloads` wil be automatically identified.\n\n- The value of `timeout` is the timeout duration for this connection.\n\n   After the timeout, the connection will be closed, no further responses will be received, and the `Promise` returned by `Action` will become `rejected`.\n\nThe passing of the second parameter can also be simplified according to follow situations:\n\n- If only `transfer` is needed, an array can be directly passed.\n- If only `timeout` is needed, a number can be directly passed.\n- If neither is needed, any of the following values can be passed: `null`, `undefined`, `[]`, any number less than or equal to `0`.\n\n## Responding Messages\n\n`Actions` support responding with messages to `Main` through either `Promise` or `EventTarget`, and both ways can be used within the same `Action`.\n\nResponding through `Promise` is suitable for situations where one request corresponds to a unique response, or that response will be the last response in the request.\n\nResponding through `EventTarget` is suitable for situations where one request will recieve multiple responses.\n\n### <span id=\"terminating\">Responding through `Promise` (`terminating responses`)</span>\n\nIn `Actions`, you can respond to messages through `Promise` either by using return value of the `Action` or by calling `this.$end()`.\n\n#### Using return value of the `Action`\n\nReturn a `Promise` in an `Action`，as shown in the <a href=\"#basic-example\" target=\"_self\">basic example</a>.\n\nIt should be noted that this method of response cannot transfer `transferable objects`. Objects like `OffscreenCanvas`, which must be transferred to be used in different contexts, cannot be sent to the main thread in this way.\n\n#### <span id=\"this_end\">Calling `this.$end()`</span>\n\nCalling `this.$end()` within `Action` can also pass the message to `Main` through `Promise`.\n\nThe first parameter that `$end()` receives is the message data to be passed, and the optional second parameter is `transfer` (If `\"auto\"`is passed in, it will automatically identify all `transferable objects` in the message as `transfer`).\n\n❗**Attention**: The `Action` cannot be defined as an arrow function if `this.$end()` needs to be called.\n\nOnce `this.$end()` is called correctly in the `Action`, it will immediately change the state of the corresponding `Promise` received in `Main` to `fulfilled`. After that, the `Action` will continue to execute, but the connection for the \"request \" will have been closed, and no further responses will be made (including responses through `EventTarget`). And the return value of the `Action` will be ignored.\n\nIt is more suitable for situations where `Action` needs to continue executing after making a response, or where a response needs to be made when excuting a callback function in `Action`.\n\nFor instance, in the <a href=\"#ts-example\" target=\"_self\">Typescript example above</a>, the `pingLater Action` is actually more suited to respond messages by calling `this.$end()`:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler-test/worker\";\n\nexport type DemoActions = {\n  pingLater: (delay: number) => ActionResult<string>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async pingLater(delay) {\n    setTimeout(() => {\n      this.$end(\"Worker received a message from Main \" + delay + \"ms ago.\");\n    }, delay);\n  }\n});\n~~~\n\n#### Comparison of two ways to send `terminating responses`\n\nUsing the function return value:\n\n- It's concise and convenient, and supports use in arrow functions.\n- It has following limitations:\n  - Once `return` is used, the `action` will not execute further.\n  - It cannot be used within the callback functions of `action`.\n  - It cannot transfer `transferable objects`.\n\nUsing `this.$end()`:\n\n- It can flexibly match various situations, as reflected in:\n  - After using `this.$end()`, the `action` can still execute further, but no further responses can be sent.\n  - It can be used within the callback functions of `action`.\n  - It can transfer `transferable objects`.\n- It does not support use in arrow functions.\n\n#### Responding without data\n\n For compatibility with the way to respond by <a href=\"#this_end\" target=\"_self\">this.\\$end()</a> or <a href=\"#this_post\" target=\"_self\">this.\\$post()</a>, when no explicit value is returned in `Action`, or the data in the returned `Promise` is `undefined`, the state of the corresponding `Promise` received in `Main` remains unaffected by the `Promise` returned by `Action`. This allows `this.$end()` and `this.$post()` to control the response when there is no need to use the return value of `Action` for responding.\n\nIf an `Action` does not need to respond with any data through `Promise`, but needs to inform `Main` that the `Action` has been completed, then the following two ways can be referenced:\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler-test/worker\";\n\nexport type DemoActions = {\n  returnNull: () => ActionResult<null>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async returnNull() {\n    // ...\n    return null\n  }\n});\n~~~\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler-test/worker\";\n\nexport type DemoActions = {\n  returnVoid: () => ActionResult;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async returnVoid() {\n    // ...\n    this.$end();\n  }\n});\n~~~\n\n### <span id=\"this_post\">Responding through `EventTarget` (`nonterminating responses`)</span>\n\nCalling `this.$post()` within `Action` can pass the message to `Main` through `EventTarget`.\n\nThe first parameter that `this.$opst()` receives is the message data to be passed, and the optional second parameter is `transfer` (If `\"auto\"` is passed in, it will automatically identify all `transferable objects` in the message as `transfer`).\n\n❗**Attention**: The `Action` cannot be defined as an arrow function if `this.$post()` needs to be called.\n\nOnce `this.$post()` is called correctly in the `Action`, it will immediately trigger the `message` event of the corresponding `MessageSource` (which extends methods similar to those in [EventTarget](https://developer.mozilla.org/zh-CN/docs/Web/API/EventTarget)) received in `Main`. The message can be received by setting the `onmessage` callback or by using `addEventListener()` to listen for the `message` event of `MessageSource`. If you need to receive the message through `Promise` as well, using `addEventListener()` it is recommended. `MessageSource.addEventListener()` will return `MessageSource` itself, allowing for convenient chaining to obtain the `Promise`.\n\nBelow is an example of responding with messages through both `EventTarget` and `Promise`:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  // The type of the data passed through the `EventTarget` is also specified by the return type of the `Action` by default.\n  pingInterval: (\n    interval: number,\n    isImmediate: boolean,\n    duration: number\n  ) => ActionResult<string>;\n};\n\n// After calling `pingInterval()`, a message will be posted every `interval` ms through `EventTarget`, and after `duration` ms, a message will be posted through `Promise` and the request connection will be closed.\nonmessage = createOnmessage<DemoActions>({\n  async pingInterval(interval, isImmediate, duration) {\n    let counter = 0;\n    const genMsg = () => \"ping \" + ++counter;\n    if (isImmediate) this.$post(genMsg());\n    const intervalId = setInterval(() => {\n      this.$post(genMsg());\n    }, interval);\n    setTimeout(() => {\n      clearInterval(intervalId);\n      this.$end(\"no longer ping\");\n    }, duration);\n  }\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { WorkerHandler } from \"worker-handler/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\ndemoWorker\n  .execute(\"pingInterval\", [], 1000, false, 5000) // A `MessageSource` will be obtained as the return value of `execute()`.\n  .addEventListener(\"message\", (e) => {\n    console.log(e.data);\n  })\n// If you use `addEventListener()` to listen for the `MessageSource`, it will return the `MessageSource` itself, allowing chaining calls.\n  .promise.then((res) => {\n    console.log(res.data);\n  });\n~~~\n\n<span id=\"Different_Types\">`The type of data passed by `this.$post()` can be specified not only by the return type of the `Action`, but also by explicitly defining the type of `this` within `Action`. You only need to set the type of `this` to the data type you intend to pass when defining the type of the `Action`. This doesn't actually define the type of `this` directly; instead, `worker-handler` handles it internally, modifying the parameter type of `this.$post()` as well as the type of data received in the main thread.</span>\n\nBelow is an example of responding with different data types of messages through both `EventTarget` and `Promise`:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  postNumReturnStr: (this: number) => ActionResult<string>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async postNumReturnStr() {\n    this.$post(1);\n    this.$end(\"1\");\n  },\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { WorkerHandler } from \"worker-handler/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\ndemoWorker\n  .execute(\"postNumReturnStr\")\n  .addEventListener(\"message\", (e) => {\n    console.log(e.data); // e.data will be inferred as a number type.\n  })\n  .promise.then((res) => {\n    console.log(res.data); // res.data will be inferred as a string type.\n  });\n~~~\n\n## <span id=\"Worker_Proxy\">Worker Proxy</span>\n\nStarting from `v0.2.0`, in environments that [support](https://caniuse.com/?search=Proxy) [Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy), messages that cannot be handled by the [structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm) is also allowed to be passed.\n\n### Basic Usage\n\nIf the data sent by `Worker` to `Main` cannot be structured cloned, then a `Proxy` that references this data (hereinafter referred to as `Worker Proxy`) will be created in `Main` as the received data:\n\n- It is possible to operate on `Worker Proxy` in `Main`, and `Worker Proxy` will update these operations to its referenced data.\n- The currently implemented `traps` for `Worker Proxy` are: `get`, `set`, `apply`, `construct`.\n- Since message passing is asynchronous, operations that return results such as `get`, `apply`, `construct` will return a new promise-like proxy object, representing the result of the operation. In environments that support the `await` syntax, adding `await` before operating on the `Proxy` (except for `set`) can simulate operations on its referenced data. In most cases, if you need to perform chained operations on `Worker Proxy`, you only need to use the `await` keyword once.\n- If the data accessed by operating the `Worker Proxy` still cannot be structured cloned, a new `Worker Proxy` referencing that data will be obtained .\n\nFor example:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  returnUncloneableData: () => ActionResult<{\n    f: () => string;\n    count: number;\n    increase: () => void;\n    Person: typeof Person;\n    layer1: { layer2: string; f: () => string };\n  }>;\n};\n\nclass Person {\n  constructor(public name: string) {}\n}\n\nonmessage = createOnmessage<DemoActions>({\n  async returnUncloneableData() {\n    const data = {\n      f: () => \"result of data.f()\",\n      count: 0,\n      increase() {\n        this.count++;\n      },\n      Person,\n      layer1: { layer2: \"nested value\", f: () => \"result of data.layer1.f()\" },\n    };\n    return data\n  },\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { WorkerHandler } from \"worker-handler/main\";\nimport { DemoActions, UnwrapPromise } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\nasync function init() {\n  const { data } = await demoWorker.execute(\"returnUncloneableData\").promise;\n\n  console.log(await data.f()); // \"result of data.f()\"\n\n  const person = await new data.Person(\"zzc6332\");\n  console.log(await person.name); // \"zzc6332\"\n\n  console.log(await data.count); // 0\n  await data.increase();\n  console.log(await data.count); // 1\n\n  console.log(await data.layer1.layer2); // \"nested value\"\n  console.log(await data.layer1.f()); // \"result of data.layer1.f()\"\n\n  // The `set` operation of `Worker Proxy` currently does not fully support the type system, so type assertions are required. Either of the following two methods can be chosen:\n  (data.layer1.layer2 as any as UnwrapPromise<\n    typeof data.layer1.layer2\n  >) = \"Hello Proxy!\";\n  // data.layer1.layer2 = \"Hello Proxy!\" as any;\n  console.log(await data.layer1.layer2); // \"Hello Proxy!\"\n}\n\ninit();\n~~~\n\n`Worker Proxy` can be used as the `payloads` parameter of `execute()`, or as the parameters of methods called by other `Worker Proxy`. In this way, it will be parsed in the `Worker` as the original data referenced by the `Worker Proxy`.\n\n### <span id=\"Worker_Array_Proxy\">Worker Array Proxy</span>\n\n`Worker Array Proxy` (supported from `v0.2.1`) is a special type of `Worker Proxy`. If the data referenced by a `Worker Proxy` is an array, then that `Worker Proxy` is a `Worker Array Proxy`.\n\nHereafter, the `Worker Array Proxy` will be referred to as `proxyArr`, and the array it references in the `Worker` will be referred to as `ogArr`.\n\nAll `Main` examples in this section are based on the following `Worker` example:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  returnUncloneableArr: () => ActionResult<\n    { index: number; f: () => string; layer1: { layer2: { index: number } } }[]\n  >;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async returnUncloneableArr() {\n    const ogArr = [0, 1, 2].map((_, index) => ({\n      index,\n      f: () => \"result of index: \" + index,\n      layer1: { layer2: { index } },\n    }));\n    return ogArr;\n  },\n});\n~~~\n\n`Worker Array Proxy` is an array-like object that can simulate some behaviors of arrays:\n\n- Accessing the item by index:\n\n  The `Worker Proxy` that references `ogArr[index]` can be accessed through `proxyArr[index]`. For example:\n\n  ~~~typescript\n  // demo.main.ts\n  import { WorkerHandler } from \"worker-handler/main\";\n  import { DemoActions } from \"./demo.worker\";\n\n  const demoWorker = new WorkerHandler<DemoActions>(\n    new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n  );\n\n  async function init() {\n    const { data: proxyArr } = await demoWorker.execute(\"returnUncloneableArr\").promise;\n\n    console.log(await proxyArr[0]); // Worker Proxy\n    console.log(await proxyArr[0].index); // 0\n    console.log(await proxyArr[0].f()); // \"result of index: 0\"\n    console.log(await proxyArr[0].layer1.layer2.index); // 0\n  }\n\n  init();\n  ~~~\n\n- Getting the length of `proxyArr`:\n\n  The length of the `ogArr` can be accessed through `await proxyArr.length`. For example:\n\n  ~~~typescript\n  // demo.main.ts\n  import { WorkerHandler } from \"worker-handler/main\";\n  import { DemoActions } from \"./demo.worker\";\n\n  const demoWorker = new WorkerHandler<DemoActions>(\n    new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n  );\n\n  async function init() {\n    const { data: proxyArr } = await demoWorker.execute(\"returnUncloneableArr\").promise;\n\n    console.log(await proxyArr.length); // 3\n  }\n\n  init();\n  ~~~\n\n- Iterating over the items of `proxyArr`:\n\n  The `proxyArr` implements an asynchronous iterator (but not a regular iterator), so it can be iterated using the `for await...of` statement. For example:\n\n  ~~~typescript\n  // demo.main.ts\n  import { WorkerHandler } from \"worker-handler/main\";\n  import { DemoActions } from \"./demo.worker\";\n\n  const demoWorker = new WorkerHandler<DemoActions>(\n    new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n  );\n\n  async function init() {\n    const { data: proxyArr } = await demoWorker.execute(\"returnUncloneableArr\")\n      .promise;\n\n    for await (const item of proxyArr) {\n      console.log(await item.index);\n    }\n    console.log(\"Iteration executed by `for await...of` is completed!\");\n    // --- The console output is as follows: ---\n    // 0\n    // 1\n    // 2\n    // \"Iteration executed by `for await...of` is completed!\"\n    // --- The console output is as above. ---\n  }\n\n  init();\n  ~~~\n\n  It can also be iterated by `proxyArr.forEach()`. For example:\n\n  ~~~typescript\n  // demo.main.ts\n  import { WorkerHandler } from \"worker-handler/main\";\n  import { DemoActions } from \"./demo.worker\";\n\n  const demoWorker = new WorkerHandler<DemoActions>(\n    new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n  );\n\n  async function init() {\n    const { data: proxyArr } = await demoWorker.execute(\"returnUncloneableArr\")\n      .promise;\n\n    // `proxyArr.forEach()` is executed asynchronously. If you need to wait for the callback function in `forEach()` to complete, you can use the `await` keyword before `forEach()`.\n    await proxyArr.forEach(async (item) => {\n      console.log(await item.index);\n    });\n    console.log(\"Iteration executed by `forEach()` is completed!\");\n    // --- The console output is as follows: ---\n    // 0\n    // 1\n    // 2\n    // \"Iteration executed by `forEach()` is completed!\"\n    // --- The console output is as above. ---\n\n    // 如果不使用 await 关键字，那么 forEach() 会晚于之后的同步代码执行\n    proxyArr.forEach(async (item) => {\n      console.log(await item.index);\n    });\n    console.log(\"Iteration executed by `forEach()` has not started!\");\n    // --- The console output is as follows: ---\n    // \"Iteration executed by `forEach()` has not started!\"\n    // 0\n    // 1\n    // 2\n    // --- The console output is as above. ---\n  }\n\n  init();\n  ~~~\n\n- Using other array methods:\n\n  Any method with the same name of array methods can be called by `proxyArr`, and all these methods are executed asynchronously.\n\n  If the return value of the original array method is an array, then the method of  `proxyArr` which has the same name of the array method will also return an actual array. For example, using `proxyArr.map()` can quickly convert proxyArr into an actual array:\n\n  ~~~typescript\n  // demo.main.ts\n  import { WorkerHandler } from \"worker-handler/main\";\n  import { DemoActions } from \"./demo.worker\";\n  \n  const demoWorker = new WorkerHandler<DemoActions>(\n    new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n  );\n  \n  async function init() {\n    const { data: proxyArr } = await demoWorker.execute(\"returnUncloneableArr\")\n      .promise;\n  \n    const actualArr = await proxyArr.map((item) => item);\n    console.log(actualArr); //  [Worker Proxy, Worker Proxy, Worker Proxy]\n  \n    // Since `actualArr` is an actual array, it has a regular iterator interface and can be iterated using the `for...of` statement.\n    for (const item of actualArr) {\n      console.log(await item.index);\n    }\n    console.log(\"Iteration executed by `for...of` is completed!\")\n    // --- The console output is as follows: ---\n    // 0\n    // 1\n    // 2\n    // \"Iteration executed by `for...of` is completed!\"\n    // --- The console output is as above. ---\n  \n    // Note that when using `forEach()` to iterate over an actual array, if the callback function passed in is an asynchronous function, it will not wait for the asynchronous operations in the callback to complete.\n    actualArr.forEach(async (item) => {\n      console.log(await item.index);\n    });\n    console.log(\"Iteration executed by `forEach()` has not started!\");\n    // --- The console output is as follows: ---\n    // \"Iteration executed by `forEach()` has not started!\"\n    // 0\n    // 1\n    // 2\n    // --- The console output is as above. ---\n  }\n  \n  init();\n  ~~~\n\n  The `ogArr` can be modified by methods of the corresponding `proxyArr` like `unshift()` or `push()`:\n\n  ~~~typescript\n  // demo.main.ts\n  import { WorkerHandler } from \"worker-handler/main\";\n  import { DemoActions } from \"./demo.worker\";\n  \n  const demoWorker = new WorkerHandler<DemoActions>(\n    new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n  );\n  \n  async function init() {\n    const { data: proxyArr } = await demoWorker.execute(\"returnUncloneableArr\")\n      .promise;\n  \n    // Remove an item from the head of `ogArr`.\n    console.log(await proxyArr.length); // 3\n    const shifted = await proxyArr.shift();\n    if (shifted) console.log(await shifted?.index); // 0\n    console.log(await proxyArr.length); // 2\n  \n    for await (const item of proxyArr) {\n      console.log(await item.index);\n    }\n    // --- The console output is as follows: ---\n    // 1\n    // 2\n    // --- The console output is as above. ---\n  \n    // Insert an item at the tail of `ogArr`.\n    if (shifted) console.log(await proxyArr.push(shifted)); // 3\n  \n    for await (const item of proxyArr) {\n      console.log(await item.index);\n    }\n    // --- The console output is as follows: ---\n    // 1\n    // 2\n    // 0\n    // --- The console output is as above. ---\n  }\n  \n  init();\n  ~~~\n\n### Advanced\n\n#### `Worker Proxy` Related Objects\n\nThe objects related to `Worker Proxy` are: `Worker Proxy`, `Worker Array Proxy`, and `Carrier Proxy`.\n\nThe relationships between `Worker Proxy` objects:\n\n- If a `Worker Proxy` (referred as `WP1`) references target data that exists with in the structure of the target data referenced by another `Worker Proxy` (referred as `WP2`), then `WP1` is a `Child Worker Proxy` (aka `Child`) of `WP2`.\n- If a `Worker Proxy` (referred as `WP1`)  references target data that is generated by the target data referenced by another `Worker Proxy` (referred as `WP2`) through function calls or class instantiation, then `WP1` is a `Derived Worker Proxy` (aka `Adopted Child`) of `WP2`.\n- If `WP1` is a `Child` of a `Child` of `WP2`, then `WP1` is also a `Child` of `WP2`. If `WP1` is a descendant of `WP2`, and there is an `Adopted Child` in their relationship chain, then `WP1` is an `Adopted Child` of `WP2`.\n\n`Worker Proxy` can be obtained through the following ways:\n\n1. When executing the `Action` in `Worker` and receiving the data it sends, if the data cannot be structured cloned, a `Worker Proxy` that references this data will be received in `Main`.\n2. If the data obtained through a `Worker Proxy` still cannot be structured cloned, a new `Worker Proxy` that references the data will be obtained. There are two situations:\n   - After performing a `get` operation on a `Worker Proxy`, if a `Worker Proxy` is obtained asynchronously, the latter is a `Child` of the former.\n   - After performing an `apply` or a `construct` operation on a `Worker Proxy`, if a `Worker Proxy` is obtained asynchronously, the latter is an `Adopted Child` of the former.\n3. If a `Worker Proxy` is a `Worker Array Proxy`, then when it executes certain array methods that require a callback function, the `item` parameter in the callback function is a `Worker Proxy` that references the corresponding target array item, and the latter is a `Child` of the fommer.\n\nThe `Worker Array Proxy` is a special type of `Worker Proxy`. If a `Worker Proxy` references target data that is an array, then it is a `Worker Array Proxy`. It can execute array methods, and its other behaviors are the same as a regular `Worker Proxy`.\n\nThe <span id=\"Carrier_Proxy\">`Carrier Proxy`</span> is a promise-like object. Since operations on a `Worker Proxy` need to asynchronously take effect on the target data in `Worker` that it references, a carrier is needed to asynchronously obtain the result of the operation. The `Carrier Proxy` serves as this carrier. An operation on a `Worker Proxy` returns a `Carrier Proxy`, and the result of the operation is obtained asynchronously through this promise-like object. If further operations are performed on the `Carrier Proxy`, a new `Carrier Proxy` is also returned, enabling chain operations on the `Worker Proxy`.\n\nIf an operation on a `Worker Proxy` takes effect on its target data and results in a `Promise` object, the corresponding `Carrier Proxy` will simulate the behavior of this `Promise` object. See the <a href=\"#Carrier_Promise_Proxy\" target=\"_self\">example</a>.\n\nBy accessing the <span id=\"proxyTypeSymbol\">`proxyTypeSymbol`</span> key of the `Worker Proxy` related object, you can obtain a string that represents the type of this object:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  returnUncloneableData: () => ActionResult<{\n    getString: () => string;\n    getUnclonable: () => { getString: () => string };\n    getArray: () => {\n      index: number;\n      f: () => string;\n      layer1: { layer2: { index: number } };\n    }[];\n  }>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async returnUncloneableData() {\n  const data = {\n      getString: () => \"result of getString()\",\n      getUnclonable() {\n        return { getString: data.getString };\n      },\n      getArray: () =>\n        [0, 1, 2].map((_, index) => ({\n          index,\n          f: () => \"index: \" + index,\n          layer1: { layer2: { index } },\n        })),\n    };\n    return data;\n  },\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { proxyTypeSymbol, WorkerHandler } from \"worker-handler/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\nasync function init() {\n  const { data } = await demoWorker.execute(\"returnUncloneableData\")\n    .promise;\n\n  console.log(data[proxyTypeSymbol]); // \"Worker Proxy\"\n  console.log(data.getString[proxyTypeSymbol]); // \"Carrier Proxy\"\n  console.log((await data.getString)[proxyTypeSymbol]); // \"Worker Proxy\"\n  console.log((await data.getArray())[proxyTypeSymbol]); // \"Worker Array Proxy\"\n  console.log((await data.getUnclonable())[proxyTypeSymbol]); // \"Worker Proxy\"\n\n  const arrProxy = await data.getArray();\n  await arrProxy.forEach((item) => {\n    console.log(item[proxyTypeSymbol]); // \"Worker Proxy\"\n  });\n}\n\ninit();\n~~~\n\n#### <span id=\"cleanup\">Clean Up Target Data</span>\n\nWhen an `Action` in the `Worker` needs to post data that cannot be structured cloned to `Main`, a `Worker Proxy` referencing this data will be created in `Main`. The referenced data is stored and prevented from being garbage collected. Starting from `v0.2.4`, target data that is no longer in use can be cleaned up automatically or manually.\n\n##### Auto Cleanup\n\nIn environments that [support](https://caniuse.com/?search=FinalizationRegistry) [FinalizationRegistry](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry), the referenced target data can be automatically cleaned up when the `Worker Proxy` is garbage collected. This feature can be enabled or disabled (enabled by default) when creating a `WorkerHandler` instance. For example:\n\n~~~typescript\n// demo.main.ts\nimport { WorkerHandler } from \"worker-handler/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url)),\n  { autoCleanup: false } // disable autoCleanup\n);\n~~~\n\n##### Manual Cleanup\n\nFor environments that do not support `FinalizationRegistry`, the target data will be cleaned up when the `Worker Proxy` that referencing it is manually revoked.\n\nWhen revoking a `Worker Proxy`, each of its `Children` will also be recursively revoked. Additionally, there is an option to specify whether to recursively revoke each of its `Adopted Children`.\n\nThere are two ways to revoke a `Worker Proxy`, and they have the same effect:\n\n- Using `revokeProxy()` of the `WorkerHandler` instance:\n\n  ~~~typescript\n  /**\n   * Recursively revoke Worker Proxy and clean up the corresponding data.\n   * @param proxy The Worker Proxy to be revoked\n   * @param options Configuration parameter `{ derived?: boolean }`, and can also be simplified to just passing a boolean value or `0 | 1`. If `true`, it indicates recursively revoking the Worker Proxy’s Children and Adopted Children; otherwise, it only recursively revokes the Children.\n     */\n  revokeProxy(\n    proxy: WorkerProxy<any>,\n    options?: { derived?: boolean } | boolean | 0 | 1\n  ): void\n  ~~~\n\n- Using the method obtained with the `revokeSymbol` key of the `Worker Proxy`:\n\n  ~~~typescript\n  [revokeSymbol](options?: { derived?: boolean } | boolean | 0 | 1): void;\n  ~~~\n\n<span id=\"revokeSymbol\">For example</span>:\n\n~~~typescript\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  returnUncloneableData: () => ActionResult<{\n    getString: () => string;\n    getUnclonableData: () => { getString: () => string };\n    getArray: () => {\n      index: number;\n      f: () => string;\n      layer1: { layer2: { index: number } };\n    }[];\n  }>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async returnUncloneableData() {\n  const data = {\n      getString: () => \"result of getString()\",\n      getUnclonableData() {\n        return { getString: data.getString };\n      },\n      getArray: () =>\n        [0, 1, 2].map((_, index) => ({\n          index,\n          f: () => \"index: \" + index,\n          layer1: { layer2: { index } },\n        })),\n    };\n    return data;\n  },\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { proxyTypeSymbol, revokeSymbol, WorkerHandler } from \"src/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url)),\n  { autoCleanup: false }\n);\n\n// Revoke the data using different derived options and check the state of the different Proxy objects.\nasync function init(derived?: { derived?: boolean } | boolean | 0 | 1) {\n  const { data } = await demoWorker.execute(\"returnUncloneableData2\").promise;\n\n  const getString = await data.getString;\n  const arrayProxy = await data.array;\n  const array = await arrayProxy.map((item) => item);\n  const derivedArrayProxy = await data.getArray();\n  const derivedArray = await derivedArrayProxy.map((item) => item);\n  const getStringOfUnclonableData = await data.getUnclonableData().getString;\n\n  data[revokeSymbol](derived); // Equivalent to `demoWorker.revokeProxy(data, derived);`\n\n  try {\n    console.log(data[proxyTypeSymbol]);\n  } catch (error) {\n    console.log(error); // Whether or not derived is enabled, it will output: \"TypeError: Cannot perform 'get' on a proxy that has been revoked\"\n  }\n\n  // `getString` is a Child of `data`\n  try {\n    console.log(getString());\n  } catch (error) {\n    console.log(error); // Whether or not derived is enabled, it will output: \"TypeError: Cannot perform 'apply' on a proxy that has been revoked\"\n  }\n\n  // `array[0]` is a Child of `data`\n  try {\n    console.log(array[0][proxyTypeSymbol]);\n  } catch (error) {\n    console.log(error); // Whether or not derived is enabled, it will output: \"TypeError: Cannot perform 'get' on a proxy that has been revoked\"\n  }\n\n  // `derivedArray[0]` is an Adopted Child of `data`\n  try {\n    console.log(derivedArray[0][proxyTypeSymbol]); // When derived is not enabled, it outputs: \"Worker Proxy\"\n  } catch (error) {\n    console.log(error); // When derived is enabled, it outputs: \"TypeError: Cannot perform 'get' on a proxy that has been revoked\"\n  }\n\n  // getStringOfUnclonableData 是 data 的 Adopted Child\n  try {\n    console.log(await getStringOfUnclonableData()); // When derived is not enabled, it outputs: \"result of getString()\"\n  } catch (error) {\n    console.log(error); // When derived is enabled, it outputs: \"TypeError: Cannot perform 'apply' on a proxy that has been revoked\"\n  }\n}\n\ninit(1); // Equivalent to `init(true);` or `init({ derived: true });`\ninit(); // Equivalent to `init(0);` or `init(false);` or `init({ derived: false });`\n~~~\n\n##### Not Recommended Practices\n\nIf the target data of a `Worker Proxy` is responded to by `this.$post()` in an `Action`, the following two practices may cause unexpected behavior in the cleanup of the target data when calling the corresponding `MessageSource.addEventListener()`:\n\n- Do not call `addEventListener()` asynchronously  after a period of time has passed since the `MessageSource` was created, for example:\n\n  ~~~typescript\n  const demoMessageSource = demoWorker.execute(\"demoAction\")\n  setTimeout(()=>{\n    demoMessageSource.addEventListener(...)\n  }, 1000)\n  ~~~\n\n  Doing so may result in the `this.$post()` in the `Action` having already executed by the time the listener is added. This will cause the target data to be stored and prevented from being garbage collected, but without creating the corresponding `Worker Proxy` in `Main`. Consequently, the target data cannot be cleaned up by revoking (or garbage collecting) the corresponding `Worker Proxy` .\n\n- Do not call `addEventListener()` multiple times on a single `MessageSource`. Otherwise, multiple `Worker Proxies` will be created for the same target data. As any one of these `Worker Proxies` is revoked (or garbage collected), the target data will be cleaned up and will no longer be accessible to the other `Worker Proxies` that reference it.\n\n## <span id=\"Promise_Object_Message\">Promise Object Messages</span>\n\nThe `Promise` object messages described in this chapter do not refer to <a href=\"#terminating\" target=\"_self\">messages responded through Promise (terminating responses)</a>, but rather to messages which have a `Promise` object as their target data.\n\nStarting from `v0.2.5`, support for `Promise` object messages has been added, allowing `Main` to intuitively handle `Promise` objects from `Worker`.\n\nThe generation of `Promise` object messages can be broadly categorized into the following three cases:\n\n- Directly responding with a `Promise` object through a `terminating response`;\n- Directly responding with a `Promise` object through a `nonterminating response`;\n- Manipulating the `Promise` object in the target data through a `Worker Proxy`.\n\n### Promise Object Messages In Terminating Responses\n\nIf a `Promise` object is posted through a `terminating response` in `Action`, the corresponding `MessageSource.promise` in `Main` will simulate the behavior of that `Promise` object.\n\nIf the value that the `Promise` object to be resolved with cannot be structured cloned, the `MessageSource.promise` will be resolved with a `Worker Proxy` that references that value.\n\nFor example:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  returnPromiseWithStr: () => ActionResult<Promise<string>>;\n  returnPromiseWithFn: () => ActionResult<Promise<() => string>>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async returnPromiseWithStr() {\n    this.$end(\n      new Promise<string>((resolve, reject) => {\n        if (Math.random() >= 0.5) {\n          resolve('fulfilled test string of \"returnPromiseWithStr\"');\n        } else {\n          reject('rejected test string of \"returnPromiseWithStr\"');\n        }\n      })\n    );\n  },\n\n  async returnPromiseWithFn() {\n    this.$end(\n      new Promise<() => string>((resolve, reject) => {\n        if (Math.random() >= 0.5) {\n          resolve(() => 'fulfilled test string of \"returnPromiseWithFn\"');\n        } else {\n          reject('rejected test string of \"returnPromiseWithFn\"');\n        }\n      })\n    );\n  },\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { proxyTypeSymbol, WorkerHandler } from \"src/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\nasync function init() {\n  try {\n    const { data } = await demoWorker.execute(\"returnPromiseWithStr\").promise;\n    // In the case where the target Promise object is fulfilled, if the value which the target Promise object resolved with can be structured cloned, then the value can be directly obtained.\n    console.log(data); // 'fulfilled test string of \"returnPromiseWithStr\"'\n  } catch (error) {\n    // In the case where the target Promise object is rejected.\n    console.log(error); // 'rejected test string of \"returnPromiseWithStr\"'\n  }\n\n  try {\n    const { data } = await worker .execute(\"returnPromiseWithFn\").promise;\n    // In the case where the target Promise object is fulfilled, if the value which the target Promise object resolved with can not be structured cloned, then a Worker Proxy referencing the value will be obtained.\n    console.log(data[proxyTypeSymbol]); // \"Worker Proxy\"\n    console.log(await data()); // 'fulfilled test string of \"returnPromiseWithFn\"'\n  } catch (error) {\n    // In the case where the target Promise object is rejected.\n    console.log(error); // 'rejected test string of \"returnPromiseWithFn\"'\n  }\n}\n\ninit();\n~~~\n\nIf you use the return value of `Action` to respond with a `Promise` object, you need to explicitly annotate the return value type when defining the `Action` function:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  returnPromiseWithStr: () => ActionResult<Promise<string>>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  // Explicitly annotate the return type of Action, which needs to match the type in DemoActions\n  async returnPromiseWithStr(): ActionResult<Promise<string>> {\n    return new Promise<string>((resolve, reject) => {\n      if (Math.random() >= 0.5) {\n        resolve('fulfilled test string of \"returnPromiseWithStr\"');\n      } else {\n        reject('rejected test string of \"returnPromiseWithStr\"');\n      }\n    });\n  }\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { proxyTypeSymbol, WorkerHandler } from \"src/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\nasync function init() {\n  try {\n    const { data } = await demoWorker.execute(\"returnPromiseWithStr\").promise;\n     // In the case where the target Promise object is fulfilled\n    console.log(data); // 'fulfilled test string of \"returnPromiseWithStr\"'\n  } catch (error) {\n     // In the case where the target Promise object is rejected\n    console.log(error); // 'rejected test string of \"returnPromiseWithStr\"'\n  }\n}\n\ninit();\n~~~\n\n### Promise Object Messages In Nonterminating Responses\n\nIf a `Promise` object is posted through a `nonterminating response` in `Action`, a simulated `Promise` object can be obtained in `Main` by listening to the corresponding `MessageSource`.\n\nIf the value that the `Promise` object to be resolved with cannot be structured cloned, the `MessageSource.promise` will be resolved with a `Worker Proxy` that references that value.\n\nFor exampler:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  postPromiseWithStr: () => ActionResult<Promise<string>>;\n  postPromiseWithFn: () => ActionResult<Promise<() => string>>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async postPromiseWithStr() {\n    const promise = new Promise<string>((resolve, reject) => {\n      if (Math.random() >= 0.5) {\n        resolve('fulfilled test string of \"postPromiseWithStr\"');\n      } else {\n        reject('rejected test string of \"postPromiseWithStr\"');\n      }\n    });\n    this.$post(promise);\n    this.$end(promise);\n  },\n\n  async postPromiseWithFn() {\n    const promise = new Promise<() => string>((resolve, reject) => {\n      if (Math.random() >= 0.5) {\n        resolve(() => 'fulfilled test string of \"postPromiseWithFn\"');\n      } else {\n        reject('rejected test string of \"postPromiseWithFn\"');\n      }\n    });\n    this.$post(promise);\n    this.$end(promise);\n  },\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { proxyTypeSymbol, WorkerHandler } from \"src/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\nasync function init() {\n  const messageSource1 = worker.execute(\"postPromiseWithStr\");\n  messageSource1.addEventListener(\"message\", async (e) => {\n    try {\n      // e.data is a Promise object that will simulate the target Promise object.\n      const resolvedValue = await e.data;\n      // In the case where the target Promise object is fulfilled, if the value which the target Promise object resolved with can be structured cloned, then the value can be directly obtained.\n      console.log(resolvedValue); // 'fulfilled test string of \"postPromiseWithStr\"'\n    } catch (error) {\n      // In the case where the target Promise object is rejected.\n      console.log(error); // 'rejected test string of \"postPromiseWithStr\"'\n    }\n  });\n  try {\n    const { data } = await messageSource1.promise;\n    // In the case where the target Promise object is fulfilled, if the value which the target Promise object resolved with can be structured cloned, then the value can be directly obtained.\n    console.log(data); // 'fulfilled test string of \"postPromiseWithStr\"'\n  } catch (error) {\n    // In the case where the target Promise object is rejected.\n    console.log(error); // 'rejected test string of \"postPromiseWithStr\"'\n  }\n\n  const messageSource2 = worker.execute(\"postPromiseWithFn\");\n  messageSource2.addEventListener(\"message\", async (e) => {\n    try {\n      // e.data is a Promise object that will simulate the target Promise object.\n      const data = await e.data;\n      // In the case where the target Promise object is fulfilled, if the value which the target Promise object resolved with can be structured cloned, then the value can be directly obtained.\n      console.log(data[proxyTypeSymbol]); // \"Worker Proxy\"\n      const resultStr = await data();\n      console.log(resultStr); // 'fulfilled test string of \"returnPromiseWithFn\"'\n    } catch (error) {\n      // In the case where the target Promise object is rejected.\n      console.log(error); //  // 'rejected test string of \"returnPromiseWithFn\"'\n    }\n  });\n  try {\n    const { data } = await messageSource2.promise;\n    // In the case where the target Promise object is fulfilled, if the value which the target Promise object resolved with can be structured cloned, then the value can be directly obtained.\n    console.log(data[proxyTypeSymbol]); // \"Worker Proxy\"\n    console.log(await data()); // 'fulfilled test string of \"returnPromiseWithFn\"'\n  } catch (error) {\n    // In the case where the target Promise object is rejected.\n    console.log(error); // 'rejected test string of \"returnPromiseWithFn\"'\n  }\n}\n\ninit();\n~~~\n\n### Promise Object Messages In Worker Proxies\n\nIf the `Worker Proxy` references target data that contains (or can generate) `Promise` objects, then when attempting to access the `Promise` objects through the `Worker Proxy`, you will get a <a href=\"#Carrier_Proxy\" target=\"_self\">Carrier Proxy</a> that references the `Promise` object. This `Carrier Proxy` will simulate the behavior of the `Promise` object. For <span id=\"Carrier_Promise_Proxy\">example</span>:\n\n~~~typescript\n// demo.worker.ts\nimport { ActionResult, createOnmessage } from \"worker-handler/worker\";\n\nexport type DemoActions = {\n  getPromise: () => ActionResult<{ getPromise: () => Promise<string> }>;\n};\n\nonmessage = createOnmessage<DemoActions>({\n  async getPromise() {\n    this.$end({\n      getPromise: () =>\n        new Promise<string>((resolve, reject) => {\n          if (Math.random() >= 0.5) {\n            resolve('fulfilled test string of \"getPromise\"');\n          } else {\n            reject('rejected test string of \"getPromise\"');\n          }\n        }),\n    });\n  },\n});\n~~~\n\n~~~typescript\n// demo.main.ts\nimport { proxyTypeSymbol, WorkerHandler } from \"src/main\";\nimport { DemoActions } from \"./demo.worker\";\n\nconst demoWorker = new WorkerHandler<DemoActions>(\n  new Worker(new URL(\"./demo.worker.ts\", import.meta.url))\n);\n\nasync function init() {\n  const { data } = await worker.execute(\"getPromise\").promise;\n  try {\n    // `data.getPromise()` will generate a Carrier Proxy that references the target Promise object, the Carrier Proxy will simulate the target Promise object.\n    console.log(data.getPromise()[proxyTypeSymbol]); // \"Carrier Proxy\"\n    const resolvedValue = await data.getPromise();\n    // In the case where the target Promise object is fulfilled.\n    console.log(resolvedValue); // 'fulfilled test string of \"getPromise\"'\n  } catch (error) {\n    // In the case where the target Promise object is rejected.\n    console.log(error); // 'rejected test string of \"getPromise\"'\n  }\n}\n\ninit();\n~~~\n\n## APIs\n\n### worker-handler/main\n\n#### WorkerHandler\n\nConstructor:\n\n- Parameters:\n\n  - `workerSrc`:\n\n     A `Worker` instance. Alternatively, if the environment can provide the path to the bundled `Worker` script as a `string` or `URL`, thay can also be passed in as `workerSrc`.\n\n  - `options`:\n\n     Configuration options for creaing a `workerHandler` instance. Currently, there is only one property, `autoCleanup`, which is a `boolean`. It indicates whether to automatically clean up the target data referenced by the `Worker Proxy` that has been garbage collected if the environment supports `FinalizationRegistry`. The default value is `true`.\n\n- Returns a `WorkerHandler` instance.\n\nInstance methods:\n\n- `execute(actionName, options, ...payloads)`:\n\n  The `execute()` method will open a connection and call the target `Action` in `Worker`.\n\n  Parameters:\n\n  - `actionName`:\n\n    The name of the target `Action` to be called.\n\n  - `options`:\n\n    The options for calling the `Action`.\n\n    The complete form of `options` is an object that includes the properties `transfer` and `timeout`:\n\n    - The value of `transfer` is an array of [transferable objects](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) that will have their ownership transferred to the `Worker`,  used to specify the `transferable objects` in `payloads` that need to be transferred.\n\n      If the value of `transfer` is `\"auto\"`, then the `transferable objects` in `payloads` wil be automatically identified.\n\n    - The value of `timeout` is a number of milliseconds representing the timeout duration for this connection.\n\n      After the specified timeout, the connection will be closed, no further responses will be received, and the `Promise` returned by the `Action` will become `rejected`.\n\n       A number less than or equal to `0` means no timeout.\n\n    If only one of `transfer` or `timeout` needs to take effect, you can directly pass the  value of the one you need to the `options`.\n\n    If neither `transfer` nor `timeout` needs to take effect, you can omit the values when not passing any `payload`. Otherwise, you can pass any of the following values: `null`, `undefined`, `[]`, any number less than or equal to `0`.\n\n  - ...`payloads`:\n\n    The parameters required for the calling of the target `Action`, passed in sequence.\n\n  Return value:\n\n  A `MessageSource`.\n\n- `terminate()`\n\n  The `terminate()` method will immediately terminate the `Worker`.\n\n- `revokeProxy(workerProxy, options?)`\n\n  Upon execution, the specified `Worker Proxy` and its related `Worker Proxies` will be revoked, and the referenced target data they reference will be cleaned up.\n\n  Parameters:\n\n  - `workerProxy`:\n\n    The `Worker Proxy` to be revoked.\n\n  - `options`:\n\n    Optional configuration parameters `{ derived?: boolean }`, which can also be simplified to a `boolean` value or `0 | 1`. If `true`, it indicates recursively revoking the `Children` and `Adopted Children` of the `Worker Proxy`; otherwise, it only recursively revokes the `Children`.\n\n#### MessageSource\n\n`MessageSource` is used to receive response messages from `Action`.\n\nProperties:\n\n- `promise`:\n\n  A `Promise` object.\n\n  When a `terminating response` is made in `Action`, the `promise` will become `fulfilled` and receive the response message.\n\n  If an error is thrown in `Action` or the `terminating response` message made by `Action` cannot be structured cloned, and the current environment does not support `Proxy`, the `promise` will become `rejected` and receive the error message.\n\n  When the `promise` is settled, the connection is closed, and `Action` will not make any more response messages (including `nonterminating response` messages).\n\n- `onmessage`:\n\n  A callback function that is called when `Action` makes a `nonterminating response` message.\n\n  It receives a parameter `e`, through which the `nonterminating response` message made by `Action` can be accessed via `e.data`.\n\n- `onmessageerror`:\n\n  A callback function that is called when the `nonterminating response` message made by `Action` cannot be structured cloned  and the current environment does not support `Proxy`.\n\n  In `typescript`, this situation is usually detected during type checking, so there is generally no need to listen for the `messageerror` event.\n\n- `readyState`:\n\n  A number representing the current state of the connection :\n\n  - `0` — `connecting`,\n  - `1` — `open`,\n  - `2` —`closed`.\n\nMethods:\n\n- `addEventListener()`\n\n  Adds an event listener, which can listen for events such as `message` and `messageerror`.\n\n  It extends `EventTarget.addEventListener()` and returns the corresponding `MessageSource` object after being called.\n\n#### UnwrapPromise\n\n`UnwrapPromise` is an utility type that can accept a `Promise` type or a `PromiseLike` type as a generic parameter and can extract the inner type. It is used for type assertion when performing `set` operations on a `Worker Proxy` or a `Carrier Proxy`.\n\n#### ReceivedData\n\nReceivedData is a utility type that can accept any type (representing the type of data in the response from an `Action`) as a generic parameter. It obtains the type of corresponding data to be received in `Main` based on  whether the generic parameter can be structured cloned (it is either the generic parameter type itself or a `WorkerProxy` type).\n\n#### WorkerProxy / CarrierProxy\n\nThese two types indicate that it is either a `Worker Proxy` or a `Carrier Proxy`. They accept a generic parameter representing the type of the target data referenced by the `Worker Proxy` or the `Carrier Proy`.\n\nIn `worker-handler/main`, some `symbol` keys are provided. They can be used to access certain properties or methods of the `Worker Proxy` or the `Carrier Proxy`:\n\n- `proxyTypeSymbol`\n\n  Used to obtain a string that representing the type of the current `Proxy`. See the <a href=\"#proxyTypeSymbol\" target=\"_self\">example</a> for usage.\n\n- `revokeSymbol`\n\n  Only applicable to `Worker Proxy`, used to obtain a method to revoke the current `Worker Proxy` and clean up the corresponding data. See the <a href=\"#revokeSymbol\" target=\"_self\">example</a> for usage.\n\n### worker-handler/worker\n\n#### createOnmessage()\n\nDefine `Actions` within an object, which is passed to the `createOnmessage()` when called, and return a listener function for the `message` event of `Worker`.\n\nUse `this.$post()` within `Action` to make `nonterminating responses`, and use `this.$end()` or return a value to make `terminating responses`.\n\n#### ActionResult\n\n`ActionResult` is a type that represents the return value of an `Action`. It requires a generic parameter that specifies the type of response message to be passed, and returns a `Promise` type.\n\nWhen defining the `Action` type, `ActionResult` is required to generate the type of return value.\n\nThe generic parameter passed also affects the types of parameters received by `this.$post()` and `this.$end()` within the `Action`.\n\nIf no generic parameters are passed, it is equivalent to `ActionResult<void>`.\n\n## Significant Updates\n\n### `v0.2.0`\n\n- <a href=\"#Worker_Proxy\" target=\"_self\">In environments that support Proxy, messages that cannot be handled by the structured clone algorithm can also be passed.</a>\n\n- When passing messages, if the `transfer` option is not specified, all `transferable objects` will be automatically identified from the message and placed into `transfer`.\n\n- When sending a `terminating response` through the return value of `Action`, the return form of `[messageData, [...transferable]]` from version `v0.1.x` is discontinued. This means that if the response data is an array, it can also be returned directly.\n\n  It is because if using `this.$end()` form to send a `terminating response`, `transfer` can be specified more intuitively, and everything that can be done using the return value form can also be done using `this.$end()`. Therefore, the use of the return value form has been simplified, making it more convenient to use in some situations to send `terminating responses`.\n\n- `ActionResult<Data>` is equivalent to `ActionResult<Data | void>` from version `v0.1.x`.\n\n### `v0.2.1`\n\n- <a href=\"#Worker_Array_Proxy\" target=\"_self\">Add Worker Array Proxy feature.</a>\n- When passing messages, if the `transfer` option is not specified, `transferable objects` will not be transferred.\n\n### `v0.2.4`\n\n- <a href=\"#cleanup\" target=\"_self\">Supports cleaning up the target data referenced by the Worker Proxy that is no longer in use.</a>\n\n### `v0.2.5`\n\n- <a href=\"#Promise_Object_Message\" target=\"_self\">Supports Promise Object Message feature.</a>\n\n### `v0.2.10`\n\n- <a href=\"#Different_Types\" target=\"_self\">Allowing `this.$post()` and `this.$end()` to send different types of data.</a>\n","readmeFilename":"README.md"}