| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-10-09 | 2.4 kB | |
| v7.1.0 source code.tar.gz | 2026-10-09 | 70.3 kB | |
| v7.1.0 source code.zip | 2026-10-09 | 76.1 kB | |
| Totals: 3 Items | 148.8 kB | 0 | |
New
- Add
pMapSettled,pMapKeyed, andpMapSettledKeyed(#70) a05fd50pMapSettledis likePromise.allSettled(), with a mapper and a concurrency limitpMapKeyedandpMapSettledKeyedmap the values of an object or aMap, likePromise.allKeyed()andPromise.allSettledKeyed()
- Add
pMapStopto stop iterating from the mapper, likebreakin a loop (#31) 27606f0 - Add
preserveOrderoption topMapIterable(#72) 2c0934b- Set it to
falseto get each result as soon as it is ready, instead of in input order
- Set it to
- Make
pMapIterableread ahead while the mappers run whenbackpressureis aboveconcurrency(#78) cada71d- A slow
inputno longer leaves a mapper waiting for its next element. With the defaultbackpressure, nothing changes
- A slow
Improvements
- Keep the caller in the stack trace of mapper errors (#34) 595754b
- Make
pMapIterableconsume its results in linear time 7d5b6e1- It was O(n²) when
backpressurelet many results wait, which is the default
- It was O(n²) when
- Reduce the per-element promise overhead ef82ce6
- Give a nullish
inputthe sameTypeErroras any other invalidinput6f4643d
Fixes
- Fix handling of a source that settles its
next()calls out of call order 415a474- The
indexand the result position now follow the order of thenext()calls - With
stopOnError: false, the errors in theAggregateErrorare now in input order, not in the order they happened
- The
- Fix
pMapIterabledropping earlier results when a mapper throws while they are still being read 27606f0- The results before the error are now yielded first, like in a loop
- Fix
pMapSkipresults not counting towardbackpressureinpMapIterable7d5b6e1- A mapper that skips most elements no longer reads further ahead than
backpressureallows
- A mapper that skips most elements no longer reads further ahead than
- Fix
pMapIterablepulling and mapping input afterreturn()orthrow()while anext()call is pending 5f2c01d
https://github.com/sindresorhus/p-map/compare/v7.0.8...v7.1.0