honest-workers

1.0.2 • Public • Published

Honest Workers

Promise based WebWorkers, for much multi-threaded goodness

npm Bower travis

Contents

Installation

This library is available for installation via both NPM and Bower, simply type one of the following, depending on your package manager, into your terminal to install the latest version:

# Install the module from NPM 
npm i honest-workers -S
 
# Or from the Bower registry 
bower i honsest-workers -S

Usage

Include this library in your application via either your choosen bundling tool, or via a script tag in the head of your website. This library will currently work out-of-the-box with all known bundlers and or transpilers.

A brief example in ES5 for Browserify or Webpack users would go as follows. This snippet will simply log "Hello!" to the console.

var honestWorkers = require('honest-workers');
 
honestWorkers.register('myEchoTask', function (msg, done) {
    done(msg);
});
 
honestWorkers.execute('myEchoTask', 'Hello!').then(function (echo) {
    console.log(echo);
});

For more detailed usage, please follow this link, where you can find the documentation generated directly from the source code.

License

This project is licensed under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i honest-workers

Weekly Downloads

7

Version

1.0.2

License

MIT

Unpacked Size

1.04 MB

Total Files

40

Last publish

Collaborators

  • iainreid948