Socket
Book a DemoInstallSign in
Socket

@bemoje/arr-get-all

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bemoje/arr-get-all

Retrieve all elements in provided indexes array.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

@bemoje/arr-get-all

Retrieve all elements in provided indexes array.

Version

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Donate

Buy Me A Beer donate button PayPal donate button

Installation

npm install @bemoje/arr-get-all
npm install --save @bemoje/arr-get-all
npm install --save-dev @bemoje/arr-get-all

Usage

import arrGetAll from '@bemoje/arr-get-all'

const arr = ['a', 'b', 'c']

arrGetAll(arr, [3])
//=> [undefined]

arrGetAll(arr, [1])
//=> ['b']

arrGetAll(arr, [1, 2, 3])
//=> ['b', 'c', undefined]

Tests

Uses Jest to test module functionality. Run tests to get coverage details.

npm run test

API

arrGetAll

Retrieve all elements in provided indexes array.

Parameters
  • arr Array The array

  • indexes Array<number> An array of indexes to get

Returns

Array The corresponding elements

Keywords

retrieve

FAQs

Package last updated on 30 Apr 2020

Did you know?

Socket

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