1.0.15 • Published 5 years ago

@josecarlosrz/array-helper v1.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

@josecarlosrz/array-helper

Helper to get async operations on methods like forEach, map, reduce, and some utilities like shuffle and unique.

It doesn't modify the original Array prototype.

Installation

npm install @josecarlosrz/array-helper

Methods

The same parameters found on the docs, adding the array to work with at the beginning.

  • forEach(arr, closure [, thisArg])
  • map(arr, closure [, thisArg])
  • filter(arr, closure [, thisArg])
  • some(arr, closure [, thisArg])
  • reduce(arr, closure [, thisArg])
  • reduceRight(arr, closure [, thisArg])
  • filter(arr, closure [, thisArg])
  • some(arr, closure [, thisArg])
  • every(arr, closure [, thisArg])
  • find(arr, closure [, thisArg])
  • findIndex(arr, closure [, thisArg])
  • areEqual(a, b)
  • unique(arr)
  • shuffle(arr)

Usage

const arrayHelper = require('@josecarlosrz/array-helper');
// ...
const array = [1, 2, 3];
await arrayHelper.forEach(array, async (element) => {
    // ...
});

Follow me on Instagram!

@josecarlosrz on Instagram

1.0.15

5 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago