From fcd99fc69a062a7ec6c006ae5aa50f42b3e164ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Valette?= Date: Sun, 11 Nov 2018 14:49:20 +0100 Subject: [PATCH] improve doc : inform about bare option there was an undocumented option to construct return a blob instead of the worker --- readme.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/readme.markdown b/readme.markdown index cf08315..3e23503 100644 --- a/readme.markdown +++ b/readme.markdown @@ -55,7 +55,7 @@ contain output from the worker: var work = require('webworkify') ``` -## var w = work(require(modulePath)) +## var w = work(require(modulePath) [, options]) Return a new [web worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker) @@ -76,6 +76,9 @@ The worker `w` returned by `webworkify` has the property `objectURL` attached. `w.objectURL` refers to the Object URL that was used to pass the module's source to the worker, and can be cleaned up using `URL.revokeObjectURL()`. (See [example](https://github.com/substack/webworkify/blob/master/example/main.js)) +### options +- bare - the return value will be the blob constructed with the worker's code and not the web worker itself. + # install With [npm](https://npmjs.org) do: