0.0.6 • Published 8 years ago

ab-array v0.0.6

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

ab-array

Array prototype addons.

// move element up Array.prototype.moveUp() // move element down Array.prototype.moveDown() // get index of element Array.prototype.indexOf() // remove element Array.prototype.removeElement()

Install

With npm do:

$ npm install ab-array --save-dev

Usage

require('ab-array');

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

myarray.moveUp('c', 1);

// myarray becomes ['a', 'c', 'b'];

myarray.moveDown('c', 1);

// myarray becomes ['a', 'b', 'c'];

myarray.indexOf('c'); 

// 2

myarray.removeElement('c');

// myarray becomes ['a', 'b'];

License

MIT

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

9 years ago

0.0.1

9 years ago