@bemoje/arr-del
Remove an element in place from an array, if present.
Version
Travis CI
Dependencies
Stats
Donate
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.