@bemoje/arr-del-immutable
Immnutably remove an element from an array if it is present.
Version
Travis CI
Dependencies
Stats
Donate
Installation
npm install @bemoje/arr-del-immutable
npm install --save @bemoje/arr-del-immutable
npm install --save-dev @bemoje/arr-del-immutable
Usage
import arrDelImmutable from '@bemoje/arr-del-immutable'
const arr = [1, 2]
const newArr = arrDelImmutable(arr, 1)
arr === newArr
arr
newArr
Tests
Uses Jest to test module functionality. Run tests to get coverage details.
npm run test
API
arrDelImmutable
Immnutably remove an element from an array if it is present.
Parameters
Returns
Array A shallow clone of the passed array with the element removed