es6-promise-pool
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"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", |
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
199
0
1
10035
3
88