A set of javascript array extensions/helpers
npm install @_rj_/array-extensionsA set of extensions to the array object to make dealing with them easier, neither unique or new, and with lots of inspiration from other languages, stackoverflow and other github projects :)
Includes TypeScript definition files.
``javascript
import "array-extensions";
// async/await
await [1,2,3].forEachAsync(async (item) => {
// do something await/async with {item}
})
// then/cath/finally
[4,5,6].forEachAsync(async (item) => {
// do something async with {item}
}).then(() => {
// execute something when done
})
``Available functions
typescript`
// proper sequential forEach on async functions
Array
`typescript`
//Concurrent async forEach, with threadCount
Array
`typescript`
// proper sequential map on async functions
Array
`typescript`
// Concurrent async map, with threadCount
Array
`typescript`
// simple reduce groupby,
Array
Array
`typescript``
// Following function should say it all, will add more over time (Only works on number arrays)
Array
Array
Array