Skip to content

adibiton/run-in-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#run-in-worker A util function that transfer execution of function to a web worker

###How to install

npm i run-in-worker -S

###How to use

var worker = require('run-in-worker');
function add(a, b){
    return a + b;
}

var bgAdd = worker.createBGTask(add);

console.log('Adding on main thread, 3 + 7 = ', add(3,7));
console.log('Adding on web worker thread, 3 + 7 = ', bgAdd(3,7));

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published