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.4.0 to 1.4.1

2

dist/index-array-by.js

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

// Version 1.4.0 index-array-by - https://github.com/vasturiano/index-array-by
// Version 1.4.1 index-array-by - https://github.com/vasturiano/index-array-by
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :

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

// Version 1.4.0 index-array-by - https://github.com/vasturiano/index-array-by
// Version 1.4.1 index-array-by - https://github.com/vasturiano/index-array-by
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).indexBy=r()}(this,(function(){"use strict";function t(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||(o[e]=t[e]);return o}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}function r(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,u,a=[],l=!0,f=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=i.call(e)).done)&&(a.push(n.value),a.length!==r);l=!0);}catch(t){f=!0,o=t}finally{try{if(!l&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,r)||n(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,r){if(t){if("string"==typeof t)return o(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(t,r):void 0}}function o(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function i(t){var r=function(t,r){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof r?r:String(r)}return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=(o instanceof Array?o.length?o:[void 0]:[o]).map((function(t){return{keyAccessor:t,isProp:!(t instanceof Function)}})),f=n.reduce((function(r,e){var n=r,o=e;return l.forEach((function(r,e){var a,f=r.keyAccessor;if(r.isProp){var c=o,s=c[f],y=t(c,[f].map(i));a=s,o=y}else a=f(o,e);e+1<l.length?(n.hasOwnProperty(a)||(n[a]={}),n=n[a]):u?(n.hasOwnProperty(a)||(n[a]=[]),n[a].push(o)):n[a]=o})),r}),{});u instanceof Function&&function t(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;e===l.length?Object.keys(r).forEach((function(t){return r[t]=u(r[t])})):Object.values(r).forEach((function(r){return t(r,e+1)}))}(f);var c=f;return a&&(c=[],function t(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];o.length===l.length?c.push({keys:o,vals:n}):Object.entries(n).forEach((function(n){var i=r(n,2),u=i[0],a=i[1];return t(a,[].concat(e(o),[u]))}))}(f),o instanceof Array&&0===o.length&&1===c.length&&(c[0].keys=[])),c}}));
{
"name": "index-array-by",
"version": "1.4.0",
"version": "1.4.1",
"description": "A utility function to index arrays by any criteria",

@@ -27,3 +27,3 @@ "type": "module",

"name": "Vasco Asturiano",
"url": "http://bl.ocks.org/vasturiano"
"url": "https://github.com/vasturiano"
},

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