Comparing version 2.2.0 to 2.2.1
@@ -5,4 +5,4 @@ 'use strict'; | ||
const pLimit = concurrency => { | ||
if (concurrency < 1) { | ||
throw new TypeError('Expected `concurrency` to be a number from 1 and up'); | ||
if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { | ||
return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up')); | ||
} | ||
@@ -9,0 +9,0 @@ |
{ | ||
"name": "p-limit", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Run multiple promise-returning & async functions with limited concurrency", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -43,3 +43,4 @@ # p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) | ||
Type: `number`<br> | ||
Minimum: `1` | ||
Minimum: `1`<br> | ||
Default: `Infinity` | ||
@@ -89,4 +90,12 @@ Concurrency limit. | ||
## License | ||
--- | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) | ||
<div align="center"> | ||
<b> | ||
<a href="https://tidelift.com/subscription/pkg/npm-p-limit?utm_source=npm-p-limit&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> | ||
</b> | ||
<br> | ||
<sub> | ||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. | ||
</sub> | ||
</div> |
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
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
6691
100