0.1.0 • Published 8 years ago

remove-from-array v0.1.0

Weekly downloads
145
License
MIT
Repository
github
Last release
8 years ago

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.