Socket
Socket
Sign inDemoInstall

@josecarlosrz/array-helper

Package Overview
Dependencies
0
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @josecarlosrz/array-helper

Array helper to have async behavior and some util methods


Version published
Maintainers
1
Install size
8.18 kB
Created

Readme

Source

@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

Keywords

FAQs

Last updated on 14 Jan 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc