Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iainjreid/honest-workers
🕸 Promise based WebWorkers, for much multi-threaded goodness
https://github.com/iainjreid/honest-workers
javascript promise web-worker
Last synced: about 22 hours ago
JSON representation
🕸 Promise based WebWorkers, for much multi-threaded goodness
- Host: GitHub
- URL: https://github.com/iainjreid/honest-workers
- Owner: iainjreid
- Created: 2016-09-07T16:48:40.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T01:14:04.000Z (almost 2 years ago)
- Last Synced: 2024-10-08T11:16:37.849Z (about 1 month ago)
- Topics: javascript, promise, web-worker
- Language: JavaScript
- Homepage: https://iainjreid.github.io/honest-workers
- Size: 776 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Honest Workers
Promise based WebWorkers, for much multi-threaded goodness
[![npm](https://img.shields.io/npm/v/honest-workers.svg?style=flat-square)](https://www.npmjs.com/package/honest-workers)
[![bower](https://img.shields.io/bower/v/honest-workers.svg?style=flat-square)](https://github.com/iainreid820/honest-workers)
![greenkeeper](https://badges.greenkeeper.io/iainreid820/honest-workers.svg?style=flat-square)
![travis](https://img.shields.io/travis/iainreid820/honest-workers/master.svg?style=flat-square)## Contents
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)## 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:```bash
# 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.
```javascript
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](https://iainreid820.github.io/honest-workers/), where you can find the documentation generated directly from the source code.
## License
This project is licensed under the MIT license.