Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ab-array

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ab-array - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc