1.6.0 • Published 6 years ago

greenmap v1.6.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Greenmap

Travis Maintainability Test Coverage npm

Map arrays asynchronously in separate threads. Powered by greenlet.

Greenmap supports only browsers, since greenlet relies on web workers.

Installation

npm i --save-dev greenmap

Usage

Pass an array and a map function to execute asynchronously in a separate thread. await result or use as a promise.

import { map } from 'greenmap';

async function mapArray() {
  const result = await map([1, 2, 3], (item) => ++item);
  console.log(result);
};

// [2, 3, 4]
mapArray();

Tests

npm test
1.6.0

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago