background-worker

0.1.2 • Public • Published

background-worker

Usage

var BackgroundWorker = require( 'background-worker' )
 
var worker = new BackgroundWorker()
 
worker.define( 'add', ( a, b ) ->  a + b )
 
worker.run( 'add', [1, 2] ).then((res) -> {
  res === 3
})
.finally( () -> worker.terminate() )

Execute tasks on web Workers without seperate files.

Partially made, with <3 at:

Foo

Readme

Keywords

none

Package Sidebar

Install

npm i background-worker

Weekly Downloads

42

Version

0.1.2

License

MIT

Last publish

Collaborators

  • gorillatron