1.0.0 • Published 7 months ago

gen-worker v1.0.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
7 months ago

gen-worker

Utility to quickly generate workers which will compute tasks and return output.

Import:

let gen-worker = require('gen-worker')

Example:

function simpleAddition (a){
    return a + 2 + 4
}
let additionForWorkerThread = simpleAddition.toString() + '; returnToParent(simpleAddition(4))'
giveWorkerWork(additionForWorkerThread).then((x) => {
    console.log(x)
})
1.0.0

7 months ago