0.1.0 • Published 8 years ago
remove-from-array v0.1.0
Remove from array
Simply remove an item from an array.
Installation
npm install --save remove-from-array
Usage
const removeFromArray = require('remove-from-array')
let array = [1, 2, 3, 4]
removeFromArray(array, 2)
removeFromArray(array, 4)
console.log(array) // [1, 3]
API
removeFromArray(array, item)
Removes the item item
from the array array
. Throws a RangeError
if the item cannot be found.
0.1.0
8 years ago