array-keys
Advanced tools
Comparing version 1.0.0 to 1.1.0
/*! | ||
* 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; |
{ | ||
"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 @@ }); |
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
15235
162