@josecarlosrz/array-helper
Advanced tools
Comparing version 1.0.10 to 1.0.11
{ | ||
"name": "@josecarlosrz/array-helper", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "Array helper to have async behavior and some util methods", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,7 +0,41 @@ | ||
# Introduction | ||
# @josecarlosrz/array-helper | ||
Helper to get async operations on your arrays, and some utilities like `shuffle` and `unique`. | ||
Helper to get async operations on methods like `forEach`, `map`, `reduce`, and some utilities like `shuffle` and `unique`. | ||
## Thanks | ||
It doesn't modify the original Array prototype. | ||
Thanks to the great documentation found at Mozilla and the support from the community. | ||
## 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 | ||
```javascript | ||
const arrayHelper = require('@josecarlosrz/array-helper'); | ||
// ... | ||
const array = [1, 2, 3]; | ||
await arrayHelper.forEach(array, async () => { | ||
// ... | ||
}); | ||
``` |
7522
41