blend / promise-utils

Lodash-like, dependency-free utilities for native ES6 promises.
MIT License
282 stars 15 forks source link

Fix handing of large sub-lists in flatMap #74

Closed Kanggg closed 2 years ago

Kanggg commented 2 years ago

Credit to @shawnjones253 for identifying the issue and provided a solution.

Major issue is with the large list handling in spread operator in node https://github.com/nodejs/node/issues/27732.

Without this fix, the test will result this Screen Shot 2022-07-01 at 4 03 23 PM

A side note: lodash's flatten function has similar issue https://github.com/lodash/lodash/blob/master/.internal/baseFlatten.js#L28

shawnjones253 commented 2 years ago

glad I could help :)

Kanggg commented 2 years ago

@shawnjones253 will resubmit a PR