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.8 to 1.2.9

2

array-keys.js
/*!
* array-keys
* version 1.2.8
* version 1.2.9
* http://github.com/silverbucket/array-keys

@@ -5,0 +5,0 @@ *

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

!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){
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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(require,module,exports){
/*!
* array-keys
* version 1.2.8
* version 1.2.9
* http://github.com/silverbucket/array-keys

@@ -128,4 +128,3 @@ *

},{}]},{},[1])
(1)
},{}]},{},[1])(1)
});

@@ -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 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)});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)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(f,s){if(!r[f]){if(!e[f]){var d="function"==typeof require&&require;if(!s&&d)return d(f,!0);if(n)return n(f,!0);var u=new Error("Cannot find module '"+f+"'");throw u.code="MODULE_NOT_FOUND",u}var h=r[f]={exports:{}};e[f][0].call(h.exports,function(t){var r=e[f][1][t];return o(r?r:t)},h,h.exports,t,e,r,i)}return r[f].exports}for(var n="function"==typeof require&&require,f=0;f<i.length;f++)o(i[f]);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)});
var gulp = require('gulp'),
fs = require('fs'),
browserify = require('gulp-browserify'),
browserify = require('browserify'),
transform = require('vinyl-transform'),
uglify = require('gulp-uglify'),

@@ -8,6 +9,14 @@ rename = require('gulp-rename'),

var filename = 'array-keys.js';
var objName = 'ArrayKeys';
gulp.task('default', function () {
gulp.src('array-keys.js')
.pipe(browserify({ standalone: 'ArrayKeys' }))
var browserified = transform(function (name) {
var b = browserify(name, { standalone: objName });
return b.bundle();
});
gulp.src(filename)
.pipe(browserified)
.pipe(gulp.dest('browser/'))

@@ -14,0 +23,0 @@ .pipe(uglify())

{
"name": "array-keys",
"version": "1.2.8",
"version": "1.2.9",
"description": "a simple interface to manage large arrays of objects easily",

@@ -20,7 +20,7 @@ "license": "MIT",

"gulp": "^3.8.8",
"gulp-browserify": "^0.5.0",
"gulp-rename": "^1.2.0",
"gulp-uglify": "^1.0.1",
"jaribu": "^0.2.2",
"minify": "^1.0.4"
"browserify": "^7.0.3",
"vinyl-transform": "^1.0.0"
},

@@ -27,0 +27,0 @@ "scripts": {

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