New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

index-array-by

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

index-array-by - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

2

dist/index-array-by.js

@@ -193,3 +193,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

} else {
key = keyAccessor(itemVal);
key = keyAccessor(itemVal, idx);
}

@@ -196,0 +196,0 @@

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

!function(r,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.indexBy=e():r.indexBy=e()}("undefined"!=typeof self?self:this,function(){return function(t){var n={};function o(r){if(n[r])return n[r].exports;var e=n[r]={i:r,l:!1,exports:{}};return t[r].call(e.exports,e,e.exports,o),e.l=!0,e.exports}return o.m=t,o.c=n,o.d=function(r,e,t){o.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:t})},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,t){var n,o,i;o=[r,e],void 0===(i="function"==typeof(n=function(r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=function(r,e){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return function(r,e){var t=[],n=!0,o=!1,i=void 0;try{for(var u,f=r[Symbol.iterator]();!(n=(u=f.next()).done)&&(t.push(u.value),!e||t.length!==e);n=!0);}catch(r){o=!0,i=r}finally{try{!n&&f.return&&f.return()}finally{if(o)throw i}}return t}(r,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.default=function(r,e){var a=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],t=3<arguments.length&&void 0!==arguments[3]&&arguments[3],s=(e instanceof Array?e:[e]).map(function(r){return{keyAccessor:r,isProp:!(r instanceof Function)}}),n=r.reduce(function(r,e){var f=r,c=e;return s.forEach(function(r,e){var t=r.keyAccessor,n=void 0;if(r.isProp){var o=c,i=o[t],u=function(r,e){var t={};for(var n in r)0<=e.indexOf(n)||Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);return t}(o,[t]);n=i,c=u}else n=t(c);e+1<s.length?(f.hasOwnProperty(n)||(f[n]={}),f=f[n]):a?(f.hasOwnProperty(n)||(f[n]=[]),f[n].push(c)):f[n]=c}),r},{});a instanceof Function&&function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;n===s.length?Object.keys(t).forEach(function(r){return t[r]=a(t[r])}):Object.values(t).forEach(function(r){return e(r,n+1)})}(n);var u=n;return t&&(u=[],function o(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];i.length===s.length?u.push({keys:i,vals:r}):Object.entries(r).forEach(function(r){var e=f(r,2),t=e[0],n=e[1];return o(n,[].concat(function(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}return Array.from(r)}(i),[t]))})}(n)),u},r.exports=e.default})?n.apply(e,o):n)||(r.exports=i)}])});
!function(r,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.indexBy=e():r.indexBy=e()}("undefined"!=typeof self?self:this,function(){return function(t){var n={};function o(r){if(n[r])return n[r].exports;var e=n[r]={i:r,l:!1,exports:{}};return t[r].call(e.exports,e,e.exports,o),e.l=!0,e.exports}return o.m=t,o.c=n,o.d=function(r,e,t){o.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:t})},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,t){var n,o,i;o=[r,e],void 0===(i="function"==typeof(n=function(r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=function(r,e){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return function(r,e){var t=[],n=!0,o=!1,i=void 0;try{for(var u,f=r[Symbol.iterator]();!(n=(u=f.next()).done)&&(t.push(u.value),!e||t.length!==e);n=!0);}catch(r){o=!0,i=r}finally{try{!n&&f.return&&f.return()}finally{if(o)throw i}}return t}(r,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.default=function(r,e){var a=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],t=3<arguments.length&&void 0!==arguments[3]&&arguments[3],s=(e instanceof Array?e:[e]).map(function(r){return{keyAccessor:r,isProp:!(r instanceof Function)}}),n=r.reduce(function(r,e){var f=r,c=e;return s.forEach(function(r,e){var t=r.keyAccessor,n=void 0;if(r.isProp){var o=c,i=o[t],u=function(r,e){var t={};for(var n in r)0<=e.indexOf(n)||Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);return t}(o,[t]);n=i,c=u}else n=t(c,e);e+1<s.length?(f.hasOwnProperty(n)||(f[n]={}),f=f[n]):a?(f.hasOwnProperty(n)||(f[n]=[]),f[n].push(c)):f[n]=c}),r},{});a instanceof Function&&function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;n===s.length?Object.keys(t).forEach(function(r){return t[r]=a(t[r])}):Object.values(t).forEach(function(r){return e(r,n+1)})}(n);var u=n;return t&&(u=[],function o(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];i.length===s.length?u.push({keys:i,vals:r}):Object.entries(r).forEach(function(r){var e=f(r,2),t=e[0],n=e[1];return o(n,[].concat(function(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}return Array.from(r)}(i),[t]))})}(n)),u},r.exports=e.default})?n.apply(e,o):n)||(r.exports=i)}])});

@@ -19,3 +19,3 @@ export default (list, keyAccessors, multiItem = true, flattenKeys = false) => {

} else {
key = keyAccessor(itemVal);
key = keyAccessor(itemVal, idx);
}

@@ -22,0 +22,0 @@

{
"name": "index-array-by",
"version": "1.2.2",
"version": "1.2.3",
"description": "A utility function to index arrays by any criteria",

@@ -5,0 +5,0 @@ "main": "dist/index-array-by.min.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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