1.1.5 • Published 5 years ago

@cuties/array-iteration v1.1.5

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

cutie-array-iteration

NPM Version Build Status codecov

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 ObjectAsync/sync callParameters(default value/description)Representation result
Everyarray.everyarray, iterator((value, index, array) => {})boolean
Filteredarray.filterarray, iterator((value, index, array) => {})array
ForEacharray.slice().forEacharray, iterator((value, index, array) => {})array
FoundIndexarray.findIndexarray, iterator((value, index, array) => {})number
Foundarray.findarray, iterator((value, index, array) => {})value
IndexOfarray.indexOfarray, item, startnumber
LastIndexOfarray.lastIndexOfarray, item, startnumber
Mappedarray.maparray, iterator((value, index, array) => {})array
Reducedarray.reducearray, iterator((total, value, index, array) => {})total
ReducedRightarray.reduceRightarray, iterator((total, value, index, array) => {})total
Somearray.somearray, iterator((value, index, array) => {})booleanx

More powerful async objects for processing collections you can find in cutie-async.