Nefarious Pickle Muncher

remove-function

1.0.3 • Public • Published

Install with npm

$ npm i remove-function

Usage

var remove = require('remove-function');
 
array.remove(value);
 
The argument value will be removed from the array and then returned. 
 
array.removeAt(index);
 
The index of the array will be removed and then returned.
 

Example

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

-string-

var stringArray = ['a', 'b', 'c'];

stringArray.remove('a');

//['b', 'c'];

-number-

var numberArray = [0, 1, 2, 3];

stringArray.remove(1);

//[0, 2, 3];

-removeAt-

var numberArray = [1, 2, 3];

stringArray.removeAt(0);

//[2, 3];

Author

Ran Crump

install

npm i remove-function

Downloadsweekly downloads

6

version

1.0.3

license

ISC

last publish

collaborators

  • avatar
Report a vulnerability