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.2.6 to 1.2.7

6

array-keys.js
/*!
* array-keys
* version 1.2.6
* version 1.2.7
* http://github.com/silverbucket/array-keys

@@ -109,5 +109,5 @@ *

count += 1;
cb(self.store[i]);
setTimeout(cb(self.store[i]), 0);
}
finished(count);
setTimeout(finished(count), 0);
}, 0);

@@ -114,0 +114,0 @@

!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.ArrayKeys=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/*!
* array-keys
* version 1.2.6
* version 1.2.7
* http://github.com/silverbucket/array-keys

@@ -110,5 +110,5 @@ *

count += 1;
cb(self.store[i]);
setTimeout(cb(self.store[i]), 0);
}
finished(count);
setTimeout(finished(count), 0);
}, 0);

@@ -115,0 +115,0 @@

@@ -1,1 +0,1 @@

!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.ArrayKeys=t()}}(function(){return function t(e,r,i){function n(f,s){if(!r[f]){if(!e[f]){var d="function"==typeof require&&require;if(!s&&d)return d(f,!0);if(o)return o(f,!0);throw new Error("Cannot find module '"+f+"'")}var u=r[f]={exports:{}};e[f][0].call(u.exports,function(t){var r=e[f][1][t];return n(r?r:t)},u,u.exports,t,e,r,i)}return r[f].exports}for(var o="function"==typeof require&&require,f=0;f<i.length;f++)n(i[f]);return n}({1:[function(t,e){function r(t){"object"!=typeof t&&(t={}),this.identifier=t.identifier||"id",this.store=[],this.idx=[]}r.prototype.getIdentifiers=function(){for(var t=[],e=this.store.length-1;e>=0;e-=1)t[t.length]=this.store[e][this.identifier];return t},r.prototype.getRecord=function(t){for(var e=this.store.length-1;e>=0;e-=1)if(this.store[e][this.identifier]===t)return this.store[e];return void 0},r.prototype.exists=function(t){return this.getIndex(t)>=0?!0:!1},r.prototype.getIndex=function(t){for(var e=this.idx.length-1;e>=0;e-=1)if(this.idx[e]===t)return e;return-1},r.prototype.addRecord=function(t){if("object"!=typeof t)throw new Error("cannot add non-object records.");if(!t[this.identifier])throw new Error("cannot add a record with no `"+this.identifier+"` property specified.");return this.removeRecord(t[this.identifier]),this.idx[this.idx.length]=t[this.identifier],this.store[this.store.length]=t,!0},r.prototype.removeRecord=function(t){var e=this.getIndex(t);if(0>e)return!1;for(var r=e;r>=0;r-=1)if(this.store[r][this.identifier]===t)return this.store.splice(r,1),this.idx.splice(e,1),!0;for(var i=this.store.length-1;i!==e;i-=1)if(this.store[i][this.identifier]===t)return this.store.splice(i,1),this.idx.splice(e,1),!0;return!1},r.prototype.forEachRecord=function(t){var e=0,r=this,i=function(){};return setTimeout(function(){for(var n=r.store.length-1;n>=0;n-=1)e+=1,t(r.store[n]);i(e)},0),{"finally":function(t){i=t}}},r.prototype.getCount=function(){return this.store.length},e.exports=r},{}]},{},[1])(1)});
!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.ArrayKeys=t()}}(function(){return function t(e,r,i){function o(s,f){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!f&&u)return u(s,!0);if(n)return n(s,!0);throw new Error("Cannot find module '"+s+"'")}var d=r[s]={exports:{}};e[s][0].call(d.exports,function(t){var r=e[s][1][t];return o(r?r:t)},d,d.exports,t,e,r,i)}return r[s].exports}for(var n="function"==typeof require&&require,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(t,e){function r(t){"object"!=typeof t&&(t={}),this.identifier=t.identifier||"id",this.store=[],this.idx=[]}r.prototype.getIdentifiers=function(){for(var t=[],e=this.store.length-1;e>=0;e-=1)t[t.length]=this.store[e][this.identifier];return t},r.prototype.getRecord=function(t){for(var e=this.store.length-1;e>=0;e-=1)if(this.store[e][this.identifier]===t)return this.store[e];return void 0},r.prototype.exists=function(t){return this.getIndex(t)>=0?!0:!1},r.prototype.getIndex=function(t){for(var e=this.idx.length-1;e>=0;e-=1)if(this.idx[e]===t)return e;return-1},r.prototype.addRecord=function(t){if("object"!=typeof t)throw new Error("cannot add non-object records.");if(!t[this.identifier])throw new Error("cannot add a record with no `"+this.identifier+"` property specified.");return this.removeRecord(t[this.identifier]),this.idx[this.idx.length]=t[this.identifier],this.store[this.store.length]=t,!0},r.prototype.removeRecord=function(t){var e=this.getIndex(t);if(0>e)return!1;for(var r=e;r>=0;r-=1)if(this.store[r][this.identifier]===t)return this.store.splice(r,1),this.idx.splice(e,1),!0;for(var i=this.store.length-1;i!==e;i-=1)if(this.store[i][this.identifier]===t)return this.store.splice(i,1),this.idx.splice(e,1),!0;return!1},r.prototype.forEachRecord=function(t){var e=0,r=this,i=function(){};return setTimeout(function(){for(var o=r.store.length-1;o>=0;o-=1)e+=1,setTimeout(t(r.store[o]),0);setTimeout(i(e),0)},0),{"finally":function(t){i=t}}},r.prototype.getCount=function(){return this.store.length},e.exports=r},{}]},{},[1])(1)});
{
"name": "array-keys",
"version": "1.2.6",
"version": "1.2.7",
"description": "a simple interface to manage large arrays of objects easily",

@@ -5,0 +5,0 @@ "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