Comparing version 1.1.1 to 1.2.0
@@ -7,6 +7,10 @@ 'use strict'; | ||
if (typeof mapper !== 'function') { | ||
throw new TypeError('Mapper function is required'); | ||
} | ||
const concurrency = opts.concurrency; | ||
if (concurrency < 1) { | ||
throw new TypeError('Expected `concurrency` to be a number from 1 and up'); | ||
if (!(typeof concurrency === 'number' && concurrency >= 1)) { | ||
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`); | ||
} | ||
@@ -13,0 +17,0 @@ |
{ | ||
"name": "p-map", | ||
"version": "1.1.1", | ||
"description": "Map over promises concurrently", | ||
"license": "MIT", | ||
"repository": "sindresorhus/p-map", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"promise", | ||
"map", | ||
"resolved", | ||
"wait", | ||
"collection", | ||
"iterable", | ||
"iterator", | ||
"race", | ||
"fulfilled", | ||
"async", | ||
"await", | ||
"promises", | ||
"concurrently", | ||
"concurrency", | ||
"parallel", | ||
"bluebird" | ||
], | ||
"devDependencies": { | ||
"ava": "*", | ||
"delay": "^1.3.1", | ||
"in-range": "^1.0.0", | ||
"random-int": "^1.0.0", | ||
"time-span": "^1.0.0", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"esnext": true | ||
} | ||
"name": "p-map", | ||
"version": "1.2.0", | ||
"description": "Map over promises concurrently", | ||
"license": "MIT", | ||
"repository": "sindresorhus/p-map", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"promise", | ||
"map", | ||
"resolved", | ||
"wait", | ||
"collection", | ||
"iterable", | ||
"iterator", | ||
"race", | ||
"fulfilled", | ||
"async", | ||
"await", | ||
"promises", | ||
"concurrently", | ||
"concurrency", | ||
"parallel", | ||
"bluebird" | ||
], | ||
"devDependencies": { | ||
"ava": "*", | ||
"delay": "^2.0.0", | ||
"in-range": "^1.0.0", | ||
"random-int": "^1.0.0", | ||
"time-span": "^2.0.0", | ||
"xo": "*" | ||
} | ||
} |
@@ -11,3 +11,3 @@ # p-map [![Build Status](https://travis-ci.org/sindresorhus/p-map.svg?branch=master)](https://travis-ci.org/sindresorhus/p-map) | ||
``` | ||
$ npm install --save p-map | ||
$ npm install p-map | ||
``` | ||
@@ -14,0 +14,0 @@ |
Sorry, the diff of this file is not supported yet
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
5285
54