Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "ab-array", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Array prototype addons", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,11 @@ # ab-array | ||
// 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 | ||
@@ -18,6 +27,22 @@ | ||
// Check source for more | ||
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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3490
47