New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parallel-es

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parallel-es

Simple parallelization for EcmaScript

  • 0.1.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

parallel.es

Build Status Coverage Status npm version

A JavaScript library that simplifies parallel computation in the browser (and other environments soon).

Getting Started

Install the library using npm:

npm install --save parallel-es

Perform a single computation on a worker thread:

import parallel from "parallel-es";

parallel.run(function () {
	//… compute
	return [1, 2, 3];
}).then(result => console.log(result));

Or use the reactive api that automatically schedules the work onto multiple worker without any additional doing:

parallel.range(0, 100000)
	.map(value => value * value)
	.then(result => console.log(result));

Debugging Support

The Library uses Function serialization and therefore debugging is not supported out of the box. However, there is a webpack plugin that rewrites your code in a way that allows debugging (at least in Chrome and Firefox Nightly).

Referencing Functions and Variables

The library uses function serialization and therefore the outer scope is no longer available when the function is invoked in the worker thread. However, there is a webpack plugin that rewrites your code and allows you to use const variables from the outer scope or reference functions.

Documentation

The API Documentation is available online. The wiki describes the architecture and programing model in more detail.

Examples

An example project using parallel-es and comparing it performance to related projects is parallel-es-example. The examples are hosted here.

Browsers support made by @godban

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Opera
Opera
iOS Safari
iOS Safari
Chrome for Android
Android
IE10, IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versionsiOS 5.1, iOS 6, iOS 7, iOS 8, iOS 9Chrome, Android 4.4

Automated browser testing is performed using BrowserStack's open source offer.

BrowserStack

Keywords

FAQs

Package last updated on 07 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc