Skip to content
This repository has been archived by the owner. It is now read-only.
Web Worker mini library
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
test
worker_scripts
.eslintrc.json
.gitignore
.travis.yml
LICENSE
README.md
config.js
karma.conf.js
package.json
perform.js

README.md

Perform Build Status

Reactive Web Worker mini library

Reason

Web worker is not a new technology in the web world. But so far there is a minimal usage for a such great technology. The goal of this library is to provide a simple API to the web developers community in order to lead them to use that power.

Installation

To install the stable version:

npm install --save performJs

Jump In

your js code

import {spawn} from 'performJs';

const task = spawn('echo.js');

task.subscribe(
	echo => console.log(echo);
	error => console.log(error);
);

task.dispatch('Hello World!');
// => 'Hello World!'

echo.js task (worker) file content

self.onmessage = function(data) {
	self.postMessage(JSON.parse(data.data));
};
You can’t perform that action at this time.