arr-remove

v1.0.0
Remove elements from a copy of an array
array remove splice

arr-remove Build Status

Remove elements from a copy of an array

Install

$ npm install --save arr-remove

Usage

var remove = require('arr-remove');

remove([1, 2, 3], 1, 2) // => [1]

API

remove(input, index, count) -> array

Performs removal on a copy of the input and returns the resulting array.

input

Required
Type: array

index

Required
Type: number

The index at which to remove elements.

count

Type: number
Default: 1

The number of items to remove.

License

MIT © Ben Drucker

npm i arr-remove

Metadata

  • MIT
  • >=0.10.0
  • Ben Drucker
  • released 6/6/2015

Downloads

Maintainers