@bemoje/arr-del

2.0.1 • Public • Published

@bemoje/arr-del

Remove an element in place from an array, if present.

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-del
npm install --save @bemoje/arr-del
npm install --save-dev @bemoje/arr-del

Usage

import arrDel from '@bemoje/arr-del'

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

arrDel(arr, 'd')
//=> ['a', 'b', 'c']

arrDel(arr, 'b')
//=> ['a', 'c']

Tests

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

npm run test

API

arrDel

Remove an element in place from an array, if present.

Parameters
  • arr Array The array

  • element any The element to remove

Returns

Array The array after removal in space.

Package Sidebar

Install

npm i @bemoje/arr-del

Weekly Downloads

3

Version

2.0.1

License

MIT

Unpacked Size

7.52 kB

Total Files

5

Last publish

Collaborators

  • bemoje