Socket
Socket
Sign inDemoInstall

p-map

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-map - npm Package Compare versions

Comparing version 5.5.0 to 6.0.0

8

index.d.ts

@@ -1,2 +0,2 @@

export interface Options {
export type Options = {
/**

@@ -14,3 +14,3 @@ Number of concurrently pending promises returned by `mapper`.

When `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises.
When `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) containing all the errors from the rejected promises.

@@ -26,4 +26,2 @@ Caveat: When `true`, any already-started async mappers will continue to run until they resolve or reject. In the case of infinite concurrency with sync iterables, *all* mappers are invoked on startup and will continue after the first rejection. [Issue #51](https://github.com/sindresorhus/p-map/issues/51) can be implemented for abort control.

**Requires Node.js 16 or later.*
@example

@@ -47,3 +45,3 @@ ```

readonly signal?: AbortSignal;
}
};

@@ -50,0 +48,0 @@ type MaybePromise<T> = T | Promise<T>;

@@ -1,3 +0,1 @@

import AggregateError from 'aggregate-error';
/**

@@ -102,3 +100,3 @@ An error to be thrown when the request is aborted by AbortController.

if (!stopOnError && errors.length > 0) {
reject(new AggregateError(errors));
reject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message
return;

@@ -105,0 +103,0 @@ }

{
"name": "p-map",
"version": "5.5.0",
"version": "6.0.0",
"description": "Map over promises concurrently",

@@ -16,3 +16,3 @@ "license": "MIT",

"engines": {
"node": ">=12"
"node": ">=16"
},

@@ -44,14 +44,11 @@ "scripts": {

],
"dependencies": {
"aggregate-error": "^4.0.0"
},
"devDependencies": {
"ava": "^4.1.0",
"ava": "^5.2.0",
"delay": "^5.0.0",
"in-range": "^3.0.0",
"random-int": "^3.0.0",
"time-span": "^5.0.0",
"tsd": "^0.19.1",
"xo": "^0.48.0"
"time-span": "^5.1.0",
"tsd": "^0.28.1",
"xo": "^0.54.1"
}
}

@@ -11,5 +11,5 @@ # p-map

```sh
npm install p-map
```
$ npm install p-map
```

@@ -78,3 +78,3 @@ ## Usage

When `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises.
When `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) containing all the errors from the rejected promises.

@@ -89,4 +89,2 @@ Caveat: When `true`, any already-started async mappers will continue to run until they resolve or reject. In the case of infinite concurrency with sync iterables, *all* mappers are invoked on startup and will continue after the first rejection. [Issue #51](https://github.com/sindresorhus/p-map/issues/51) can be implemented for abort control.

*Requires Node.js 16 or later.*
```js

@@ -138,8 +136,2 @@ import pMap from 'p-map';

## p-map for enterprise
Available as part of the Tidelift Subscription.
The maintainers of p-map and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-p-map?utm_source=npm-p-map&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## Related

@@ -152,3 +144,2 @@

- [p-map-series](https://github.com/sindresorhus/p-map-series) - Map over promises serially
- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control
- [More…](https://github.com/sindresorhus/promise-fun)
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