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

array-keys

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-keys - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

6

array-keys.js
/*!
* array-keys
* version 1.0.0
* version 1.1.0
* http://github.com/silverbucket/array-keys

@@ -73,2 +73,6 @@ *

ArrayKeys.prototype.getCount = function () {
return this.idx.length;
};
if (typeof window === 'object') {

@@ -75,0 +79,0 @@ window.ArrayKeys = ArrayKeys;

2

package.json
{
"name": "array-keys",
"version": "1.0.0",
"version": "1.1.0",
"description": "a simple interface to manage large arrays of objects easily",

@@ -5,0 +5,0 @@ "license": "LGPL",

@@ -33,5 +33,5 @@ if (typeof define !== 'function') {

{
desc: '# addRecord',
desc: '# addRecord 1',
run: function (env, test) {
test.assert(env.ak.addRecord({id:'thingy'}), true);
test.assert(env.ak.addRecord({id:'thingy1'}), true);
}

@@ -43,3 +43,3 @@ },

run: function (env, test) {
test.assert(env.ak.getRecord('thingy'), {id:'thingy'});
test.assert(env.ak.getRecord('thingy1'), {id:'thingy1'});
}

@@ -53,3 +53,45 @@ },

}
}
},
{
desc: '# addRecord 2',
run: function (env, test) {
test.assert(env.ak.addRecord({id:'thingy2'}), true);
}
},
{
desc: '# addRecord 3',
run: function (env, test) {
test.assert(env.ak.addRecord({id:'thingy3'}), true);
}
},
{
desc: '# getCount (3)',
run: function (env, test) {
test.assert(env.ak.getCount(), 3);
}
},
{
desc: '# getIndexes',
run: function (env, test) {
test.assert(env.ak.getIdentifiers(), ['thingy3', 'thingy2', 'thingy1']);
}
},
{
desc: '# removeRecord 2',
run: function (env, test) {
test.assert(env.ak.removeRecord('thingy2'), true);
}
},
{
desc: '# getCount (2)',
run: function (env, test) {
test.assert(env.ak.getCount(), 2);
}
},
]

@@ -56,0 +98,0 @@ });

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