Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

es6-promise-pool

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-promise-pool - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

es6-promise-pool.js

28

package.json
{
"name": "es6-promise-pool",
"version": "0.1.1",
"version": "0.1.2",
"description": "Runs Promises in a pool that limits their maximum concurrency.",

@@ -9,3 +9,24 @@ "author": {

},
"main": "promise-pool.js",
"main": "es6-promise-pool.js",
"keywords": [
"promise",
"promises",
"promises-a",
"promises-aplus",
"future",
"futures",
"deferred",
"deferreds",
"generator",
"generators",
"async",
"await",
"flow control",
"pool",
"queue",
"throttle",
"es6",
"browser",
"node"
],
"dependencies": {

@@ -28,2 +49,5 @@ "es6-promise": "^2.0.1"

},
"files": [
"es6-promise-pool.js"
],
"repository": {

@@ -30,0 +54,0 @@ "type": "git",

31

README.md

@@ -24,19 +24,24 @@ # Promise Pool [![Build Status](https://travis-ci.org/timdp/es6-promise-pool.svg?branch=master)](https://travis-ci.org/timdp/es6-promise-pool)

## Demo
## Compatibility
### Node.js
This module can be used both under **Node.js** (version 0.10 and up) and on the
**Web**. In both cases, your platform needs to have the `Promise` prototype
available. You can use
[ES6-Promise](https://github.com/jakearchibald/es6-promise) as a polyfill; it
is used internally as well.
## Installation
```bash
npm install
node demo.js
npm install --save es6-promise-pool
```
Add `--harmony` for generator support if you have Node.js version 0.11.
```html
<script src="es6-promise.js"></script>
<script>ES6Promise.polyfill();</script>
<script src="es6-promise-pool.js"></script>
```
### Web
## Usage
See `demo.html`.
## Basic Usage
```js

@@ -83,5 +88,5 @@ // On the Web, just leave out this line.

The `promisePool` function takes a variety of `Promise`-producing objects. Let's
first assume we have this helper function that returns a promise for the given
`value` after `time` milliseconds:
The `promisePool` function takes a `Promise`-producing function as its first
argument. Let's first assume that we have this helper function that returns a
promise for the given `value` after `time` milliseconds:

@@ -88,0 +93,0 @@ ```js

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