1.0.3 • Published 6 years ago

remove-function v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

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

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago