{"_id":"web-worker","_rev":"4128857","name":"web-worker","description":"Consistent Web Workers in browser and Node.","dist-tags":{"latest":"1.5.0"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"time":{"modified":"2026-03-01T18:28:49.000Z","created":"2014-09-18T19:57:17.896Z","1.5.0":"2025-01-31T18:09:36.457Z","1.4.1":"2025-01-31T17:16:03.759Z","1.4.0":"2025-01-31T15:57:28.625Z","1.3.0":"2024-01-04T19:43:07.522Z","1.2.0":"2021-11-05T01:38:35.307Z","1.1.0":"2021-09-06T20:59:23.353Z","1.0.0":"2020-04-17T15:55:14.873Z","0.1.6":"2014-09-24T12:54:29.483Z","0.1.5":"2014-09-23T18:38:01.011Z","0.1.4":"2014-09-23T18:30:12.263Z","0.1.3":"2014-09-23T18:22:45.047Z","0.1.2":"2014-09-23T18:18:43.165Z","0.1.0":"2014-09-23T18:13:45.869Z","0.0.0":"2014-09-18T19:57:17.896Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/developit/web-worker.git"},"versions":{"1.5.0":{"name":"web-worker","version":"1.5.0","description":"Consistent Web Workers in browser and Node.","main":"./dist/browser/index.cjs","browser":"./dist/browser/index.cjs","types":"./types/index.d.cts","type":"module","exports":{"import":{"types":"./types/index.d.ts","bun":"./src/browser/index.js","browser":"./src/browser/index.js","default":"./src/node/index.js"},"module":{"types":"./types/index.d.ts","bun":"./src/browser/index.js","browser":"./src/browser/index.js","default":"./src/node/index.js"},"default":{"types":"./types/index.d.cts","bun":"./dist/browser/index.cjs","browser":"./dist/browser/index.cjs","default":"./dist/node/index.cjs"}},"scripts":{"prepare":"tsup","test":"eslint '*.js' test && node --experimental-modules ./node_modules/.bin/ava"},"repository":{"type":"git","url":"git+https://github.com/developit/web-worker.git"},"keywords":["worker","worker_threads","webworker","web worker","web-worker","threads"],"authors":[],"license":"Apache-2.0","homepage":"https://github.com/developit/web-worker","eslintConfig":{"extends":"developit","rules":{"no-console":0}},"devDependencies":{"ava":"^6.2.0","eslint":"^7.32.0","eslint-config-developit":"^1.2.0","eslint-plugin-compat":"^4.2.0","tsup":"^8.0.2"},"_id":"web-worker@1.5.0","gitHead":"9d20474a7d7cefa98add3d59dba8293f01ab70bc","bugs":{"url":"https://github.com/developit/web-worker/issues"},"_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"shasum":"71b2b0fbcc4293e8f0aa4f6b8a3ffebff733dcc5","size":9923,"noattachment":false,"key":"/web-worker/-/web-worker-1.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-1.5.0.tgz"},"_npmUser":{"name":"developit","email":"jason@developit.ca"},"directories":{},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/web-worker_1.5.0_1738346976224_0.782634681893315"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-31T18:09:36.457Z","publish_time":1738346976457,"_source_registry_name":"default","_cnpm_publish_time":1738346976457},"1.4.1":{"name":"web-worker","version":"1.4.1","description":"Consistent Web Workers in browser and Node.","main":"./dist/browser/index.cjs","browser":"./dist/browser/index.cjs","types":"./types/index.d.cts","type":"module","exports":{"import":{"types":"./types/index.d.ts","bun":"./src/browser/index.js","browser":"./src/browser/index.js","default":"./src/node/index.js"},"module":{"types":"./types/index.d.ts","bun":"./src/browser/index.js","browser":"./src/browser/index.js","default":"./src/node/index.js"},"default":{"types":"./types/index.d.cts","bun":"./dist/browser/index.cjs","browser":"./dist/browser/index.cjs","default":"./dist/node/index.cjs"}},"scripts":{"prepare":"tsup","test":"eslint '*.js' test && node --experimental-modules ./node_modules/.bin/ava"},"repository":{"type":"git","url":"git+https://github.com/developit/web-worker.git"},"keywords":["worker","worker_threads","webworker","web worker","web-worker","threads"],"authors":[],"license":"Apache-2.0","homepage":"https://github.com/developit/web-worker","eslintConfig":{"extends":"developit","rules":{"no-console":0}},"devDependencies":{"ava":"^6.2.0","eslint":"^7.32.0","eslint-config-developit":"^1.2.0","eslint-plugin-compat":"^4.2.0","tsup":"^8.0.2"},"_id":"web-worker@1.4.1","gitHead":"1fda46ca4529fd40274c1e5bbe899a138a158f10","bugs":{"url":"https://github.com/developit/web-worker/issues"},"_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"shasum":"894e71a8f6fce059dc175864fcdf9e633eb7cc6b","size":9657,"noattachment":false,"key":"/web-worker/-/web-worker-1.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-1.4.1.tgz"},"_npmUser":{"name":"developit","email":"jason@developit.ca"},"directories":{},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/web-worker_1.4.1_1738343763495_0.09611426658122513"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-31T17:16:03.759Z","publish_time":1738343763759,"_source_registry_name":"default","_cnpm_publish_time":1738343763759},"1.4.0":{"name":"web-worker","version":"1.4.0","description":"Consistent Web Workers in browser and Node.","main":"./dist/browser/index.cjs","browser":"./dist/browser/index.cjs","types":"./types/index.d.cts","type":"module","exports":{"import":{"types":"./types/index.d.ts","bun":"./src/browser/index.js","browser":"./src/browser/index.js","default":"./src/node/index.js"},"module":{"types":"./types/index.d.ts","bun":"./src/browser/index.js","browser":"./src/browser/index.js","default":"./src/node/index.js"},"default":{"types":"./types/index.d.cts","bun":"./dist/browser/index.cjs","browser":"./dist/browser/index.cjs","default":"./dist/node/index.cjs"}},"scripts":{"prepare":"tsup","test":"eslint '*.js' test && node --experimental-modules ./node_modules/.bin/ava"},"repository":{"type":"git","url":"git+https://github.com/developit/web-worker.git"},"keywords":["worker","worker_threads","webworker","web worker","web-worker","threads"],"authors":[],"license":"Apache-2.0","homepage":"https://github.com/developit/web-worker","eslintConfig":{"extends":"developit","rules":{"no-console":0}},"devDependencies":{"ava":"^6.2.0","eslint":"^7.32.0","eslint-config-developit":"^1.2.0","eslint-plugin-compat":"^4.2.0","tsup":"^8.0.2"},"_id":"web-worker@1.4.0","gitHead":"96651ab1dc597b0da4a3d563342a4a98756f0de1","bugs":{"url":"https://github.com/developit/web-worker/issues"},"_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"shasum":"7dbd1fca42d25f429429b7a3d1ba6f853a22939a","size":9642,"noattachment":false,"key":"/web-worker/-/web-worker-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-1.4.0.tgz"},"_npmUser":{"name":"developit","email":"jason@developit.ca"},"directories":{},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/web-worker_1.4.0_1738339048418_0.17450472979800846"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-31T15:57:28.625Z","publish_time":1738339048625,"_source_registry_name":"default","_cnpm_publish_time":1738339048625},"1.3.0":{"name":"web-worker","version":"1.3.0","description":"Consistent Web Workers in browser and Node.","main":"./cjs/node.js","browser":"./cjs/browser.js","types":"./index.d.ts","exports":{"types":"./index.d.ts","import":{"bun":"./browser.js","browser":"./browser.js","default":"./node.js"},"module":{"bun":"./browser.js","browser":"./browser.js","default":"./node.js"},"default":{"bun":"./cjs/browser.js","browser":"./cjs/browser.js","default":"./cjs/node.js"}},"scripts":{"prepare":"babel node.js browser.js -d cjs","test":"eslint '*.js' test && node --experimental-modules ./node_modules/.bin/ava"},"babel":{"plugins":["@babel/plugin-syntax-dynamic-import","babel-plugin-commonjs-lite"]},"repository":{"type":"git","url":"git+https://github.com/developit/web-worker.git"},"keywords":["worker","worker_threads","webworker","web worker","web-worker","threads"],"authors":[],"license":"Apache-2.0","homepage":"https://github.com/developit/web-worker","eslintConfig":{"extends":"developit","rules":{"no-console":0}},"devDependencies":{"@babel/cli":"^7.21.0","@babel/core":"^7.21.0","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-modules-commonjs":"7.21","ava":"2.4","babel-plugin-commonjs-lite":"gist:3e38560d5bed35da1fd708d635e4acb3","eslint":"^7.32.0","eslint-config-developit":"^1.2.0","eslint-plugin-compat":"^4.2.0"},"gitHead":"b89a392aa178c70701ee89abef4a5d30f8c59527","bugs":{"url":"https://github.com/developit/web-worker/issues"},"_id":"web-worker@1.3.0","_nodeVersion":"19.6.1","_npmVersion":"9.4.0","dist":{"shasum":"e5f2df5c7fe356755a5fb8f8410d4312627e6776","size":9204,"noattachment":false,"key":"/web-worker/-/web-worker-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-1.3.0.tgz"},"_npmUser":{"name":"developit","email":"jason@developit.ca"},"directories":{},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web-worker_1.3.0_1704397387315_0.7613346713624587"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-01-04T19:43:07.522Z","publish_time":1704397387522,"_source_registry_name":"default","_cnpm_publish_time":1704397387522},"1.2.0":{"name":"web-worker","version":"1.2.0","description":"Consistent Web Workers in browser and Node.","main":"./cjs/node.js","browser":"./cjs/browser.js","exports":{"browser":"./cjs/browser.js","node":"./cjs/node.js","default":"./cjs/node.js"},"types":"index.d.ts","scripts":{"prepare":"babel node.js browser.js -d cjs","test":"eslint '*.js' test && node --experimental-modules ./node_modules/.bin/ava"},"babel":{"plugins":["@babel/plugin-syntax-dynamic-import","babel-plugin-commonjs-lite"]},"repository":{"type":"git","url":"git+https://github.com/developit/web-worker.git"},"keywords":["worker","worker_threads","webworker","web worker","web-worker","threads"],"authors":[],"license":"Apache-2.0","homepage":"https://github.com/developit/web-worker","eslintConfig":{"extends":"developit","rules":{"no-console":0}},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-modules-commonjs":"^7.7.5","@babel/preset-env":"^7.7.7","ava":"^2.4.0","babel-plugin-commonjs-lite":"gist:3e38560d5bed35da1fd708d635e4acb3","eslint":"^6.8.0","eslint-config-developit":"^1.1.1"},"gitHead":"29fef9775702c91887d3d8733e595edf1a188f31","bugs":{"url":"https://github.com/developit/web-worker/issues"},"_id":"web-worker@1.2.0","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"shasum":"5d85a04a7fbc1e7db58f66595d7a3ac7c9c180da","size":9159,"noattachment":false,"key":"/web-worker/-/web-worker-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-1.2.0.tgz"},"_npmUser":{"name":"developit","email":"jason@developit.ca"},"directories":{},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web-worker_1.2.0_1636076315161_0.975856097163742"},"_hasShrinkwrap":false,"publish_time":1636076315307,"_cnpm_publish_time":1636076315307,"_cnpmcore_publish_time":"2021-12-16T21:14:48.412Z"},"1.1.0":{"name":"web-worker","version":"1.1.0","description":"Consistent Web Workers in browser and Node.","main":"./cjs/node.js","browser":"./cjs/browser.js","exports":{"browser":"./cjs/browser.js","node":"./cjs/node.js","default":"./cjs/node.js"},"types":"index.d.ts","scripts":{"prepare":"babel node.js browser.js -d cjs","test":"eslint '*.js' test && node --experimental-modules ./node_modules/.bin/ava"},"babel":{"plugins":["@babel/plugin-syntax-dynamic-import","babel-plugin-commonjs-lite"]},"repository":{"type":"git","url":"git+https://github.com/developit/web-worker.git"},"keywords":["worker","worker_threads","webworker","web worker","web-worker","threads"],"authors":[],"license":"Apache-2.0","homepage":"https://github.com/developit/web-worker","eslintConfig":{"extends":"developit","rules":{"no-console":0}},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-modules-commonjs":"^7.7.5","@babel/preset-env":"^7.7.7","ava":"^2.4.0","babel-plugin-commonjs-lite":"gist:3e38560d5bed35da1fd708d635e4acb3","eslint":"^6.8.0","eslint-config-developit":"^1.1.1"},"gitHead":"243c135c38b5e00f4309935a8644282615d01d51","bugs":{"url":"https://github.com/developit/web-worker/issues"},"_id":"web-worker@1.1.0","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"shasum":"5cb84a7aab7c36da32965641cf6db6db8adfb794","size":9156,"noattachment":false,"key":"/web-worker/-/web-worker-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-1.1.0.tgz"},"_npmUser":{"name":"developit","email":"jason@developit.ca"},"directories":{},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web-worker_1.1.0_1630961963210_0.6640059568159196"},"_hasShrinkwrap":false,"publish_time":1630961963353,"_cnpm_publish_time":1630961963353,"_cnpmcore_publish_time":"2021-12-16T21:14:48.635Z"},"1.0.0":{"name":"web-worker","version":"1.0.0","description":"Consistent Web Workers in browser and Node.","main":"./cjs/node.js","browser":"./cjs/browser.js","exports":{"browser":"./cjs/browser.js","node":"./cjs/node.js","default":"./cjs/node.js"},"scripts":{"prepare":"babel node.js browser.js -d cjs","test":"eslint '*.js' test && node --experimental-modules ./node_modules/.bin/ava"},"babel":{"plugins":["@babel/plugin-syntax-dynamic-import","babel-plugin-commonjs-lite"]},"repository":{"type":"git","url":"git+https://github.com/developit/web-worker.git"},"keywords":["worker","worker_threads","webworker","web worker","web-worker","threads"],"authors":[],"license":"Apache-2.0","homepage":"https://github.com/developit/web-worker","eslintConfig":{"extends":"developit","rules":{"no-console":0}},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-syntax-dynamic-import":"^7.7.4","@babel/plugin-transform-modules-commonjs":"^7.7.5","@babel/preset-env":"^7.7.7","ava":"^2.4.0","babel-plugin-commonjs-lite":"gist:3e38560d5bed35da1fd708d635e4acb3","eslint":"^6.8.0","eslint-config-developit":"^1.1.1"},"gitHead":"d004d65c90f9e2dc6e6c3718fe64b17d408fd18e","bugs":{"url":"https://github.com/developit/web-worker/issues"},"_id":"web-worker@1.0.0","_nodeVersion":"12.16.0","_npmVersion":"6.13.4","dist":{"shasum":"c7ced4e1eb6227636ada35056a9e5a477414e4d0","size":8761,"noattachment":false,"key":"/web-worker/-/web-worker-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-1.0.0.tgz"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"_npmUser":{"name":"developit","email":"jason@developit.ca"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web-worker_1.0.0_1587138914691_0.4765174564732564"},"_hasShrinkwrap":false,"publish_time":1587138914873,"_cnpm_publish_time":1587138914873,"_cnpmcore_publish_time":"2021-12-16T21:14:48.875Z"},"0.1.6":{"name":"web-worker","version":"0.1.6","description":"make web workers from strings with iframe fallback","main":"lib/index.js","scripts":{"test":"prova -l firefox -bq"},"repository":{"type":"git","url":"https://github.com/calvinmetcalf/web-worker.git"},"author":{"name":"Calvin Metcalf"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/web-worker/issues"},"homepage":"https://github.com/calvinmetcalf/web-worker","dependencies":{"hbsify":"^1.0.1","lie":"^2.7.7"},"devDependencies":{"browserify":"^5.12.0","prova":"^1.14.2"},"browserify":{"transform":["hbsify"]},"_id":"web-worker@0.1.6","dist":{"shasum":"19a783c893dafe22de1952f0962f8ff518db73b8","size":5901,"noattachment":false,"key":"/web-worker/-/web-worker-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-0.1.6.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1411563269483,"_hasShrinkwrap":false,"_cnpm_publish_time":1411563269483,"_cnpmcore_publish_time":"2021-12-16T21:14:49.068Z"},"0.1.5":{"name":"web-worker","version":"0.1.5","description":"make web workers from strings with iframe fallback","main":"lib/index.js","scripts":{"test":"prova -l firefox -bq"},"repository":{"type":"git","url":"https://github.com/calvinmetcalf/web-worker.git"},"author":{"name":"Calvin Metcalf"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/web-worker/issues"},"homepage":"https://github.com/calvinmetcalf/web-worker","dependencies":{"hbsify":"^1.0.1","lie":"^2.7.7"},"devDependencies":{"browserify":"^5.12.0","prova":"^1.14.2"},"browserify":{"transform":["hbsify"]},"_id":"web-worker@0.1.5","dist":{"shasum":"ed95b89c673338a3aabc058307ac5f67a01d76bf","size":5908,"noattachment":false,"key":"/web-worker/-/web-worker-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-0.1.5.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1411497481011,"_hasShrinkwrap":false,"_cnpm_publish_time":1411497481011,"_cnpmcore_publish_time":"2021-12-16T21:14:49.321Z"},"0.1.4":{"name":"web-worker","version":"0.1.4","description":"make web workers from strings with iframe fallback","main":"lib/index.js","scripts":{"test":"prova -l firefox -bq"},"repository":{"type":"git","url":"https://github.com/calvinmetcalf/web-worker.git"},"author":{"name":"Calvin Metcalf"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/web-worker/issues"},"homepage":"https://github.com/calvinmetcalf/web-worker","dependencies":{"hbsify":"^1.0.1","lie":"^2.7.7"},"devDependencies":{"browserify":"^5.12.0","prova":"^1.14.2"},"browserify":{"transform":["hbsify"]},"_id":"web-worker@0.1.4","dist":{"shasum":"59689d372eb9fd5ce9eee043d2f8ae3242b9d3ef","size":5901,"noattachment":false,"key":"/web-worker/-/web-worker-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-0.1.4.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1411497012263,"_hasShrinkwrap":false,"_cnpm_publish_time":1411497012263,"_cnpmcore_publish_time":"2021-12-16T21:14:49.555Z"},"0.1.3":{"name":"web-worker","version":"0.1.3","description":"make web workers from strings with iframe fallback","main":"lib/index.js","scripts":{"test":"prova -l firefox -bq"},"repository":{"type":"git","url":"https://github.com/calvinmetcalf/web-worker.git"},"author":{"name":"Calvin Metcalf"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/web-worker/issues"},"homepage":"https://github.com/calvinmetcalf/web-worker","dependencies":{"hbsify":"^1.0.1","lie":"^2.7.7"},"devDependencies":{"browserify":"^5.12.0","prova":"^1.14.2"},"browserify":{"transform":["hbsify"]},"_id":"web-worker@0.1.3","dist":{"shasum":"761c6131b28a2b7415aba635b78b68a5c1e2a9c7","size":5895,"noattachment":false,"key":"/web-worker/-/web-worker-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-0.1.3.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1411496565047,"_hasShrinkwrap":false,"_cnpm_publish_time":1411496565047,"_cnpmcore_publish_time":"2021-12-16T21:14:49.761Z"},"0.1.2":{"name":"web-worker","version":"0.1.2","description":"make web workers from strings with iframe fallback","main":"lib/index.js","scripts":{"test":"prova -l firefox -bq"},"repository":{"type":"git","url":"https://github.com/calvinmetcalf/web-worker.git"},"author":{"name":"Calvin Metcalf"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/web-worker/issues"},"homepage":"https://github.com/calvinmetcalf/web-worker","dependencies":{"hbsify":"^1.0.1","lie":"^2.7.7"},"devDependencies":{"browserify":"^5.12.0","prova":"^1.14.2"},"browserify":{"transform":["hbsify"]},"_id":"web-worker@0.1.2","dist":{"shasum":"459780e416e7246dd081f8ac24220f7142af5ca0","size":5895,"noattachment":false,"key":"/web-worker/-/web-worker-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-0.1.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1411496323165,"_hasShrinkwrap":false,"_cnpm_publish_time":1411496323165,"_cnpmcore_publish_time":"2021-12-16T21:14:49.995Z"},"0.1.0":{"name":"web-worker","version":"0.1.0","description":"make web workers from strings","main":"lib/index.js","scripts":{"test":"prova -l firefox -bq"},"repository":{"type":"git","url":"https://github.com/calvinmetcalf/web-worker.git"},"author":{"name":"Calvin Metcalf"},"license":"ISC","bugs":{"url":"https://github.com/calvinmetcalf/web-worker/issues"},"homepage":"https://github.com/calvinmetcalf/web-worker","dependencies":{"hbsify":"^1.0.1","lie":"^2.7.7"},"devDependencies":{"browserify":"^5.12.0","prova":"^1.14.2"},"browserify":{"transform":["hbsify"]},"_id":"web-worker@0.1.0","dist":{"shasum":"69b740c3b8b2cc90f0e0d9faf2ed391828fe85e3","size":5871,"noattachment":false,"key":"/web-worker/-/web-worker-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1411496025869,"_hasShrinkwrap":false,"_cnpm_publish_time":1411496025869,"_cnpmcore_publish_time":"2021-12-16T21:14:50.210Z"},"0.0.0":{"name":"web-worker","version":"0.0.0","description":"make web workers from strings","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/calvinmetcalf/web-worker.git"},"author":{"name":"Calvin Metcalf"},"license":"ISC","bugs":{"url":"https://github.com/calvinmetcalf/web-worker/issues"},"homepage":"https://github.com/calvinmetcalf/web-worker","_id":"web-worker@0.0.0","dist":{"shasum":"c7d6caf37e5770be5df736fd32b70979be9a7289","size":1396,"noattachment":false,"key":"/web-worker/-/web-worker-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/web-worker/download/web-worker-0.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1411070237896,"_hasShrinkwrap":false,"_cnpm_publish_time":1411070237896,"_cnpmcore_publish_time":"2021-12-16T21:14:50.445Z"}},"readme":"<h1 align=\"center\">\n  web-worker\n  <a href=\"https://www.npmjs.org/package/web-worker\"><img src=\"https://img.shields.io/npm/v/web-worker.svg?style=flat-square\" alt=\"npm\"></a>\n</h1>\n<p align=\"center\">\n  Native cross-platform Web Workers. Works in published npm modules.\n</p>\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/105127/79602228-1998bf00-80b8-11ea-91e4-26b212aabaa2.png\" width=\"1000\" alt=\"\">\n</p>\n\n**In Node**, it's a web-compatible Worker implementation atop Node's [worker_threads](https://nodejs.org/api/worker_threads.html).\n\n**In the browser** (and when bundled for the browser), it's simply an alias of `Worker`.\n\n### Features\n\n_Here's how this is different from worker_threads:_\n\n- makes Worker code compatible across browser and Node\n- supports Module Workers (`{type:'module'}`) natively in Node 12.8+\n- uses DOM-style events (`Event.data`, `Event.type`, etc)\n- supports event handler properties (`worker.onmessage=..`)\n- `Worker()` accepts a module URL, Blob URL or Data URL\n- emulates browser-style [WorkerGlobalScope] within the worker\n\n### Usage Example\n\nIn its simplest form:\n\n```js\nimport Worker from 'web-worker';\n\nconst worker = new Worker('data:,postMessage(\"hello\")');\nworker.onmessage = e => console.log(e.data);  // \"hello\"\n```\n\n<table>\n<thead><tr><th><strong>main.js</strong></th><th><strong>worker.js</strong></th></tr></thead>\n<tbody><tr><td>\n\n```js\nimport Worker from 'web-worker';\n\nconst url = new URL('./worker.js', import.meta.url);\nconst worker = new Worker(url);\n\nworker.addEventListener('message', e => {\n  console.log(e.data)  // \"hiya!\"\n});\n\nworker.postMessage('hello');\n```\n\n</td><td valign=\"top\">\n\n```js\naddEventListener('message', e => {\n  if (e.data === 'hello') {\n    postMessage('hiya!');\n  }\n});\n```\n\n</td></tr></tbody>\n</table>\n\n???? Notice how `new URL('./worker.js', import.meta.url)` is used above to load the worker relative to the current module instead of the application base URL. Without this, Worker URLs are relative to a document's URL, which in Node.js is interpreted to be `process.cwd()`.\n\n> _Support for this pattern in build tools and test frameworks is still limited. We are [working on growing this](https://github.com/developit/web-worker/issues/4)._\n\n### Module Workers\n\nModule Workers are supported in Node 12.8+ using this plugin, leveraging Node's native ES Modules support.\nIn the browser, they can be used natively in Chrome 80+, or in all browsers via [worker-plugin] or [rollup-plugin-off-main-thread]. As with classic workers, there is no difference in usage between Node and the browser:\n\n<table>\n<thead><tr><th><strong>main.mjs</strong></th><th><strong>worker.mjs</strong></th></tr></thead>\n<tbody><tr><td>\n\n```js\nimport Worker from 'web-worker';\n\nconst worker = new Worker(\n  new URL('./worker.mjs', import.meta.url),\n  { type: 'module' }\n);\nworker.addEventListener('message', e => {\n  console.log(e.data)  // \"200 OK\"\n});\nworker.postMessage('https://httpstat.us/200');\n```\n\n</td><td valign=\"top\">\n\n```js\nimport fetch from 'isomorphic-fetch';\n\naddEventListener('message', async e => {\n  const url = e.data;\n  const res = await fetch(url)\n  const text = await res.text();\n  postMessage(text);\n});\n```\n\n</td></tr></tbody>\n</table>\n\n\n### Data URLs\n\nInstantiating Worker using a Data URL is supported in both module and classic workers:\n\n```js\nimport Worker from 'web-worker';\n\nconst worker = new Worker(`data:application/javascript,postMessage(42)`);\nworker.addEventListener('message', e => {\n  console.log(e.data)  // 42\n});\n```\n\n### Special Thanks\n\nThis module aims to provide a simple and forgettable piece of infrastructure,\nand as such it needed an obvious and descriptive name.\n[@calvinmetcalf](https://github.com/calvinmetcalf), who you may recognize as the author of [Lie](https://github.com/calvinmetcalf/lie) and other fine modules, gratiously offered up the name from his `web-worker` package.\nThanks Calvin!\n\n\n[worker-plugin]: https://github.com/googlechromelabs/worker-plugin\n[rollup-plugin-off-main-thread]: https://github.com/surma/rollup-plugin-off-main-thread\n[WorkerGlobalScope]: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope\n","_attachments":{},"homepage":"https://github.com/developit/web-worker","bugs":{"url":"https://github.com/developit/web-worker/issues"},"license":"Apache-2.0"}