remove-function
v1.0.3
Published
Install with [npm](https://www.npmjs.com/)
Downloads
5
Readme
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