OUROBOROS WORKER
WebWorker to share the code of the main thread
Installation
$ npm install ouroboros-worker
API
run(mainThread: function, workerThread: function): void
Example
const OuroborosWorker = ; { worker; // (1) send to the worker worker { // (4) receive from the worker console; // → good bye! };} { self { // (2) receive from the main thread console; // → hello! self; // (3) send to the main thread }} OuroborosWorker;
License
MIT