{"_id":"workerify","_rev":"4096685","name":"workerify","description":"Transform web workers into browserified inline Blobs with browserify.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"shama","email":""}],"time":{"modified":"2025-12-08T22:53:25.000Z","created":"2013-06-15T17:36:35.745Z","1.1.0":"2017-11-02T21:22:46.829Z","1.0.0":"2017-04-25T15:04:53.519Z","0.3.0":"2014-04-14T05:08:21.785Z","0.2.3":"2013-11-06T00:35:40.100Z","0.2.2":"2013-07-28T02:36:44.754Z","0.2.1":"2013-07-13T00:22:45.562Z","0.2.0":"2013-06-26T19:53:29.163Z","0.1.0":"2013-06-15T17:36:35.745Z"},"users":{},"author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/workerify.git"},"versions":{"1.1.0":{"name":"workerify","description":"Transform web workers into browserified inline Blobs with browserify.","version":"1.1.0","homepage":"https://github.com/shama/workerify","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"main":"index.js","keywords":["worker","browserify","transform"],"repository":{"type":"git","url":"git://github.com/shama/workerify.git"},"bugs":{"url":"https://github.com/shama/workerify/issues"},"license":"MIT","engines":{"node":">= 0.8.0"},"scripts":{"test":"browserify test/test.js -t ./ -o test/out.js","start":"budo example/index.js -- -t ./"},"files":["LICENSE-MIT","index.js"],"dependencies":{"browserify":"^14.5.0","falafel":"^2.1.0","jsesc":"^2.5.0","through":"^2.3.4"},"devDependencies":{"budo":"^10.0.3","workerstream":"^1.2.1","tape":"^4.8.0"},"testling":{"files":"test/out.js","browsers":["ielatest","chrome/latest","firefoxlatest","safari/latest","opera/latest","iphone/latest","ipad/latest","android-browser/latest"]},"gitHead":"0727b53b262ecce4859a018b7a1614d0f1bb497c","_id":"workerify@1.1.0","_npmVersion":"5.4.2","_nodeVersion":"8.5.0","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"dist":{"shasum":"6851e0619dc928d5d99a228084d7380b1612fcc7","size":3768,"noattachment":false,"key":"/workerify/-/workerify-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/workerify/download/workerify-1.1.0.tgz"},"maintainers":[{"name":"shama","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/workerify-1.1.0.tgz_1509657766707_0.8764017794746906"},"directories":{},"publish_time":1509657766829,"_hasShrinkwrap":false,"_cnpm_publish_time":1509657766829,"_cnpmcore_publish_time":"2021-12-16T22:19:17.302Z"},"1.0.0":{"name":"workerify","description":"Transform web workers into browserified inline Blobs with browserify.","version":"1.0.0","homepage":"https://github.com/shama/workerify","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"main":"index.js","keywords":["worker","browserify","transform"],"repository":{"type":"git","url":"git://github.com/shama/workerify.git"},"bugs":{"url":"https://github.com/shama/workerify/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/workerify/blob/master/LICENSE-MIT"}],"engines":{"node":">= 0.8.0"},"scripts":{"test":"browserify test/test.js -t ./ -o test/out.js","start":"budo example/index.js -- -t ./"},"files":["LICENSE-MIT","index.js"],"dependencies":{"browserify":"^14.0.0","falafel":"^0.2.1","jsesc":"^2.5.0","through":"^2.3.4"},"devDependencies":{"budo":"^10.0.3","workerstream":"^1.2.1","tape":"^4.6.3"},"testling":{"files":"test/out.js","browsers":["ielatest","chrome/latest","firefoxlatest","safari/latest","opera/latest","iphone/latest","ipad/latest","android-browser/latest"]},"gitHead":"b2a253a23665b0e8db4434b1039cbdfbd2ee2ac9","_id":"workerify@1.0.0","_shasum":"d8c17e29e080c080d96898e7cd5d8facb3fe8a3a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"dist":{"shasum":"d8c17e29e080c080d96898e7cd5d8facb3fe8a3a","size":3638,"noattachment":false,"key":"/workerify/-/workerify-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/workerify/download/workerify-1.0.0.tgz"},"maintainers":[{"name":"shama","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/workerify-1.0.0.tgz_1493132693294_0.2895880462601781"},"directories":{},"publish_time":1493132693519,"_hasShrinkwrap":false,"_cnpm_publish_time":1493132693519,"_cnpmcore_publish_time":"2021-12-16T22:19:17.491Z"},"0.3.0":{"name":"workerify","description":"Transform web workers into browserified inline Blobs with browserify.","version":"0.3.0","homepage":"https://github.com/shama/workerify","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"main":"index.js","keywords":["worker","browserify","transform"],"repository":{"type":"git","url":"git://github.com/shama/workerify.git"},"bugs":{"url":"https://github.com/shama/workerify/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/workerify/blob/master/LICENSE-MIT"}],"engines":{"node":">= 0.8.0"},"scripts":{"test":"browserify test/test.js -t ./ -o test/out.js","start":"beefy example/index.js -- -t ./"},"files":["LICENSE-MIT","index.js"],"dependencies":{"browserify":"~3.41.0","falafel":"~0.2.1","jsesc":"~0.3.0","through":"~2.3.4"},"devDependencies":{"beefy":"~1.1.0","workerstream":"~1.0.1","tape":"~2.12.3"},"testling":{"files":"test/out.js","browsers":["ielatest","chrome/latest","firefoxlatest","safari/latest","opera/latest","iphone/latest","ipad/latest","android-browser/latest"]},"_id":"workerify@0.3.0","dist":{"shasum":"5d8e6ce9b6db7bf139d2dd8beacf5a88827449f6","size":3589,"noattachment":false,"key":"/workerify/-/workerify-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/workerify/download/workerify-0.3.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":""}],"directories":{},"publish_time":1397452101785,"_hasShrinkwrap":false,"_cnpm_publish_time":1397452101785,"_cnpmcore_publish_time":"2021-12-16T22:19:17.678Z"},"0.2.3":{"name":"workerify","description":"Transform web workers into browserified inline Blobs with browserify.","version":"0.2.3","homepage":"https://github.com/shama/workerify","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"main":"index.js","keywords":["worker","browserify","transform"],"repository":{"type":"git","url":"git://github.com/shama/workerify.git"},"bugs":{"url":"https://github.com/shama/workerify/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/workerify/blob/master/LICENSE-MIT"}],"engines":{"node":">= 0.8.0"},"scripts":{"test":"node test/workerify.js","start":"cd example && ./node_modules/.bin/beefy index.js 8080 -- -t workerify"},"dependencies":{"browserify":"~2.18.1","falafel":"~0.2.1","jsesc":"~0.3.0","through":"~2.3.4"},"devDependencies":{"beefy":"~0.4.0","workerstream":"~1.0.1"},"readmeFilename":"README.md","_id":"workerify@0.2.3","dist":{"shasum":"8946dbf6a2b94ac2d1f63805a17ace96c0dc203b","size":4129,"noattachment":false,"key":"/workerify/-/workerify-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/workerify/download/workerify-0.2.3.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":""}],"directories":{},"publish_time":1383698140100,"_hasShrinkwrap":false,"_cnpm_publish_time":1383698140100,"_cnpmcore_publish_time":"2021-12-16T22:19:17.874Z"},"0.2.2":{"name":"workerify","description":"Transform web workers into browserified inline Blobs with browserify.","version":"0.2.2","homepage":"https://github.com/shama/workerify","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"main":"index.js","keywords":["worker","browserify","transform"],"repository":{"type":"git","url":"git://github.com/shama/workerify.git"},"bugs":{"url":"https://github.com/shama/workerify/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/workerify/blob/master/LICENSE-MIT"}],"engines":{"node":">= 0.8.0"},"scripts":{"test":"node test/workerify.js","start":"cd example && ./node_modules/.bin/beefy index.js 8080 -- -t workerify"},"dependencies":{"browserify":"~2.18.1","falafel":"~0.2.1","jsesc":"~0.3.0","through":"~2.3.4"},"devDependencies":{"beefy":"~0.4.0","workerstream":"~1.0.1"},"readmeFilename":"README.md","_id":"workerify@0.2.2","dist":{"shasum":"20129909813cf03734e017215ce2dad8faf0f02f","size":4061,"noattachment":false,"key":"/workerify/-/workerify-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/workerify/download/workerify-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":""}],"directories":{},"publish_time":1374979004754,"_hasShrinkwrap":false,"_cnpm_publish_time":1374979004754,"_cnpmcore_publish_time":"2021-12-16T22:19:18.058Z"},"0.2.1":{"name":"workerify","description":"Transform web workers into browserified inline Blobs with browserify.","version":"0.2.1","homepage":"https://github.com/shama/workerify","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"main":"index.js","keywords":["worker","browserify","transform"],"repository":{"type":"git","url":"git://github.com/shama/workerify.git"},"bugs":{"url":"https://github.com/shama/workerify/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/workerify/blob/master/LICENSE-MIT"}],"engines":{"node":">= 0.8.0"},"scripts":{"test":"node test/workerify.js","start":"cd example && ./node_modules/.bin/beefy index.js 8080 -- -t workerify"},"dependencies":{"through":"~2.3.4","browserify":"~2.18.1","string-escape":"~0.1.6","falafel":"~0.2.1"},"devDependencies":{"beefy":"~0.4.0","workerstream":"~1.0.1"},"readmeFilename":"README.md","_id":"workerify@0.2.1","dist":{"shasum":"2a62329578eac62470cc7e1334c565886b08d9fc","size":4034,"noattachment":false,"key":"/workerify/-/workerify-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/workerify/download/workerify-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":""}],"directories":{},"publish_time":1373674965562,"_hasShrinkwrap":false,"_cnpm_publish_time":1373674965562,"_cnpmcore_publish_time":"2021-12-16T22:19:18.283Z"},"0.2.0":{"name":"workerify","description":"Transform web workers into browserified inline Blobs with browserify.","version":"0.2.0","homepage":"https://github.com/shama/workerify","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"main":"index.js","keywords":["worker","browserify","transform"],"repository":{"type":"git","url":"git://github.com/shama/workerify.git"},"bugs":{"url":"https://github.com/shama/workerify/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/workerify/blob/master/LICENSE-MIT"}],"engines":{"node":">= 0.8.0"},"scripts":{"test":"node test/workerify.js"},"dependencies":{"through":"~2.3.4","browserify":"~2.18.1","string-escape":"~0.1.6"},"devDependencies":{},"readmeFilename":"README.md","_id":"workerify@0.2.0","dist":{"shasum":"cb0132021fc605b70db18d9de5e19db6c7dac484","size":3464,"noattachment":false,"key":"/workerify/-/workerify-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/workerify/download/workerify-0.2.0.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":""}],"directories":{},"publish_time":1372276409163,"_hasShrinkwrap":false,"_cnpm_publish_time":1372276409163,"_cnpmcore_publish_time":"2021-12-16T22:19:18.483Z"},"0.1.0":{"name":"workerify","description":"Transform web workers into browserified inline Blobs with browserify.","version":"0.1.0","homepage":"https://github.com/shama/workerify","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"main":"index.js","keywords":["worker","browserify","transform"],"repository":{"type":"git","url":"git://github.com/shama/workerify.git"},"bugs":{"url":"https://github.com/shama/workerify/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/workerify/blob/master/LICENSE-MIT"}],"engines":{"node":">= 0.8.0"},"scripts":{"test":"node test/workerify.js"},"dependencies":{"through":"~2.3.4","esprima":"~1.0.3","estraverse":"~1.1.2","escodegen":"0.0.23"},"devDependencies":{},"readmeFilename":"README.md","_id":"workerify@0.1.0","dist":{"shasum":"55afd2049db5d9b173c2348259481424d01ab951","size":3230,"noattachment":false,"key":"/workerify/-/workerify-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/workerify/download/workerify-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":""}],"directories":{},"publish_time":1371317795745,"_hasShrinkwrap":false,"_cnpm_publish_time":1371317795745,"_cnpmcore_publish_time":"2021-12-16T22:19:18.681Z"}},"readme":"# workerify\n\nTransform web workers into browserified inline Blobs with browserify.\n\n[![browser support](https://ci.testling.com/shama/workerify.png)](https://ci.testling.com/shama/workerify)\n\n## example\n\nYour entry point `main.js`:\n```js\nvar mod = require('module')\nvar worker = new Worker('worker.js')\n```\n\nYour worker entry point `worker.js`:\n```js\nself.onmessage = function(e) {\n  var ab = new Uint8Array(10)\n  for (var n = 0; n < ab.length; n++) ab[n] = 1\n  self.postMessage(ab.buffer, [ab.buffer])\n}\n```\n\nBrowserify with this workerify transform:\n```shell\nbrowserify -t workerify main.js > bundle.js\n```\n\nand your `bundle.js` will look like:\n```js\nvar mod = require('module')\nvar worker = new Worker(window.URL.createObjectURL(new Blob(['BROWSERIFIED CONTENTS OF worker.js'])));\n```\n\n### further example\nTake a look at the [example module](https://github.com/shama/workerify/tree/master/example) for using with [workerstream](https://github.com/maxogden/workerstream).\n\n## Modular Workers\nThe main reason for this is modular workers.\n\nLet's say you create a module that would like to use web workers. Users would\nneed to configure the URL to the worker. When your module becomes a dependency\nof a dependency and so on, the setup becomes really cumbersome. Especially when\nyour worker needs to be browserified.\n\nWith this transform you simply `npm install workerify --save` and configure your\nmodule's `package.json` to apply the transform:\n\n``` json\n{\n  \"name\": \"mymodule\",\n  \"browserify\": {\n    \"transform\": \"workerify\"\n  }\n}\n```\n\nNow when end users `browserify` your module, anywhere in the dependency tree, it\nwill browserify and inline the worker. No URLs, no extra build steps and no\nadditional end user requirements.\n\n## Notes\nCurrently it will transform the following:\n\n```js\n// String literal\nnew Worker('./path/to/worker.js')\n\n// Variable Init Earlier\nvar myworker = './path/to/worker.js'\nnew Worker(myworker)\n\n// Or specify the workerify keyword to browserify a string anywhere\n// Useful if you want to inline your worker when working with other libs\nvar myworker = workerify './path/to/worker.js'\nvar workerstream = require('workerstream')(myworker)\n```\n\n### Using with coffeescript\n\n```shell\nbrowserify file.coffee -t coffeeify -t workerify\n```\n\n## install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install workerify\n```\n\n## release history\n* 1.1.0 - Support for Workers as modules (@moin-qidwai).\n* 1.0.0 - Upgrade browserify to 14.0.0 (@runn1ng) and other deps. Prefer window.URL over window.webkitURL.\n* 0.3.0 - Upgrade browserify to 3.41.0. Allow worker to be used with watchify (@tmpvar)\n* 0.2.3 - support compilation from coffeescript original source file\n* 0.2.2 - string-escape dep renamed to jsesc (@mathiasbynens)\n* 0.2.1 - Add missing falafel dep and bug fixes (@mikolalysenko)\n* 0.2.0 - use falafel and support more formats\n* 0.1.0 - initial release\n\n## license\nCopyright (c) 2017 Kyle Robinson Young<br/>\nLicensed under the MIT license.\n","_attachments":{},"homepage":"https://github.com/shama/workerify","bugs":{"url":"https://github.com/shama/workerify/issues"},"license":"MIT"}