@cuties/array-iteration
v1.1.5
Published
Cutie extension for JavaScript array iteration methods.
Downloads
4
Readme
cutie-array-iteration
Cutie for JavaScript array iteration methods. It's based on the Async Tree Pattern.
Examples
You can find examples of using this library in the test directory.
Install
npm install @cuties/array-iteration
Run test
npm test
Run build
npm run build
Usage
const {
// Here needed async objects from the table below
} = require('@cuties/cutie-array-iteration');
For more information about parameters in the async objects visit docs.
| Async Object | Async/sync call | Parameters(default value/description) | Representation result |
| ------------- | ----------------| ---------- | --------------------- |
| Every
| array.every
| array, iterator((value, index, array) => {})
| boolean
|
| Filtered
| array.filter
| array, iterator((value, index, array) => {})
| array
|
| ForEach
| array.slice().forEach
| array, iterator((value, index, array) => {})
| array
|
| FoundIndex
| array.findIndex
| array, iterator((value, index, array) => {})
| number
|
| Found
| array.find
| array, iterator((value, index, array) => {})
| value
|
| IndexOf
| array.indexOf
| array, item, start
| number
|
| LastIndexOf
| array.lastIndexOf
| array, item, start
| number
|
| Mapped
| array.map
| array, iterator((value, index, array) => {})
| array
|
| Reduced
| array.reduce
| array, iterator((total, value, index, array) => {})
| total
|
| ReducedRight
| array.reduceRight
| array, iterator((total, value, index, array) => {})
| total
|
| Some
| array.some
| array, iterator((value, index, array) => {})
| boolean
|x
More powerful async objects for processing collections you can find in cutie-async.