Skip to content

LinusU/node-remove-from-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published