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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i remove-function

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

1.31 kB

Total Files

3

Last publish

Collaborators

  • ranner198