@cuties/array-iteration

1.1.5 • Public • Published

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 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

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

/@cuties/array-iteration/

    Package Sidebar

    Install

    npm i @cuties/array-iteration

    Weekly Downloads

    2

    Version

    1.1.5

    License

    MIT

    Unpacked Size

    16 kB

    Total Files

    32

    Last publish

    Collaborators

    • guseyn