Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array-extended

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-extended - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

.idea/.name

4

array-extended.min.js

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

/*! array-extended - v0.0.9 - 2013-06-17
* Copyright (c) 2013 Doug Martin; Licensed MIT */
/*! array-extended - v0.0.10 - 2014-04-01
* Copyright (c) 2014 Doug Martin; Licensed MIT */
!function(){"use strict";function a(a,b,c){function d(a,b){return o(b,function(b,c){return N(c)||(c=[c]),c.unshift(a),b.unshift(c),b},[])}function e(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push([a].concat(y(b,e)).slice(0,c));return d}function f(a,b){var c,d,e=[],f=-1;for(d=a.length;++f<d;)c=a[f],-1!==g(b,c)&&e.push(c);return e}function g(a,b,c){for(var d=(c||0)-1,e=a.length;++d<e;)if(a[d]===b)return d;return-1}function h(a,b){if(!N(a))throw new TypeError;var c=Object(a),d=c.length>>>0;if(0===d)return-1;var e=d;arguments.length>2&&(e=Number(arguments[2]),e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*P(Q(e))));for(var f=e>=0?R(e,d-1):d-Q(e);f>=0;f--)if(f in c&&c[f]===b)return f;return-1}function i(a,b,c){if(a&&X&&X===a.filter)return a.filter(b,c);if(!N(a)||"function"!=typeof b)throw new TypeError;for(var d=Object(a),e=d.length>>>0,f=[],g=0;e>g;g++)if(g in d){var h=d[g];b.call(c,h,g,d)&&f.push(h)}return f}function j(a,b,c){if(!N(a)||"function"!=typeof b)throw new TypeError;if(a&&T&&T===a.forEach)return a.forEach(b,c),a;for(var d=0,e=a.length;e>d;++d)b.call(c||a,a[d],d,a);return a}function k(a,b,c){if(a&&Y&&Y===a.every)return a.every(b,c);if(!N(a)||"function"!=typeof b)throw new TypeError;for(var d=Object(a),e=d.length>>>0,f=0;e>f;f++)if(f in d&&!b.call(c,d[f],f,d))return!1;return!0}function l(a,b,c){if(a&&Z&&Z===a.some)return a.some(b,c);if(!N(a)||"function"!=typeof b)throw new TypeError;for(var d=Object(a),e=d.length>>>0,f=0;e>f;f++)if(f in d&&b.call(c,d[f],f,d))return!0;return!1}function m(a,b,c){if(a&&U&&U===a.map)return a.map(b,c);if(!N(a)||"function"!=typeof b)throw new TypeError;for(var d=Object(a),e=d.length>>>0,f=[],g=0;e>g;g++)g in d&&f.push(b.call(c,d[g],g,d));return f}function n(a,b,c){var d=arguments.length>2;if(a&&V&&V===a.reduce)return d?a.reduce(b,c):a.reduce(b);if(!N(a)||"function"!=typeof b)throw new TypeError;var e=0,f=a.length>>0;if(arguments.length<3){if(0===f)throw new TypeError("Array length is 0 and no second argument");c=a[0],e=1}else c=arguments[2];for(;f>e;)e in a&&(c=b.call(void 0,c,a[e],e,a)),++e;return c}function o(a,b,c){var d=arguments.length>2;if(a&&W&&W===a.reduceRight)return d?a.reduceRight(b,c):a.reduceRight(b);if(!N(a)||"function"!=typeof b)throw new TypeError;var e=Object(a),f=e.length>>>0;if(0===f&&2===arguments.length)throw new TypeError;var g=f-1;if(arguments.length>=3)c=arguments[2];else for(;;)if(g in a){c=a[g--];break}for(;g>=0;)g in e&&(c=b.call(void 0,c,e[g],g,e)),g--;return c}function p(a){var c=[];if(null!==a){var d=$(arguments);if(1===d.length)if(N(a))c=a;else if(b.isHash(a))for(var e in a)a.hasOwnProperty(e)&&c.push([e,a[e]]);else c.push(a);else j(d,function(a){c=c.concat(p(a))})}return c}function q(a){return a=a||[],a.length?n(a,function(a,b){return a+b}):0}function r(a){if(a=a||[],a.length){var c=q(a);if(b.isNumber(c))return c/a.length;throw new Error("Cannot average an array of non numbers.")}return 0}function s(a,b){return _(a,b)}function t(a,b){return _(a,b)[0]}function u(a,b){return _(a,b)[a.length-1]}function v(a){var b=a,c=J($(arguments,1));return N(a)&&(b=i(a,function(a){return-1===g(c,a)})),b}function w(a){var b,c=[],d=-1,e=0;if(a)for(b=a.length;++d<b;){var f=a[d];-1===g(c,f)&&(c[e++]=f)}return c}function x(a){return w(a)}function y(a,b){var c=a.slice();return"number"!=typeof b&&(b=1),b&&N(a)?(b>0?(c.push(c.shift()),b--):(c.unshift(c.pop()),b++),y(c,b)):c}function z(a,b){var c=[];if(N(a)){var d=a.slice(0);"number"!=typeof b&&(b=a.length),b?b<=a.length&&(c=n(a,function(a,c,f){var g;return g=b>1?e(c,y(d,f).slice(1),b):[[c]],a.concat(g)},[])):c=[[]]}return c}function A(){var a=[],c=$(arguments);if(c.length>1){var d=c.shift();N(d)&&(a=n(d,function(a,d,e){for(var f=[d],g=0;g<c.length;g++){var h=c[g];N(h)&&!b.isUndefined(h[e])?f.push(h[e]):f.push(null)}return a.push(f),a},[]))}return a}function B(a){var b=[];if(N(a)&&a.length){var c;j(a,function(a){!N(a)||c&&a.length!==c.length||(j(a,function(a,c){b[c]||(b[c]=[]),b[c].push(a)}),c=a)})}return b}function C(a,b){var c=[];if(b=$(arguments),a=b.shift(),N(a)&&b.length)for(var d=0,e=b.length;e>d;d++)c.push(a[b[d]]||null);return c}function D(){var a=[],b=$(arguments);if(b.length>1){for(var c=0,d=b.length;d>c;c++)a=a.concat(b[c]);a=w(a)}return a}function E(){var a,b,c=[],d=-1;if(a=arguments.length>1?$(arguments):arguments[0],N(a))for(c=a[0],d=0,b=a.length;++d<b;)c=f(c,a[d]);return w(c)}function F(a){var b=[];return N(a)&&a.length&&(b=n(a,function(a,b){var c=m(a,function(a){return a.concat(b)});return a.concat(c)},[[]])),b}function G(a,b){var c=[];return N(a)&&N(b)&&a.length&&b.length&&(c=d(a[0],b).concat(G(a.slice(1),b))),c}function H(a){var c=[];return N(a)&&a.length&&(c=i(a,function(a){return!b.isUndefinedOrNull(a)})),c}function I(a,c){c=b.isNumber(c)?c:1,c||(c=1),a=p(a||[]);for(var d=[],e=0;++e<=c;)d=d.concat(a);return d}function J(a){var b,c=$(arguments);return b=c.length>1?c:p(a),n(b,function(a,b){return a.concat(b)},[])}function K(a,b){b=b.split(".");var c=a.slice(0);return j(b,function(a){var b=a.match(/(\w+)\(\)$/);c=m(c,function(c){return b?c[b[1]]():c[a]})}),c}function L(a,b,c){return c=$(arguments,2),m(a,function(a){var d=M(b)?a[b]:b;return d.apply(a,c)})}var M=b.isString,N=Array.isArray||b.isArray,O=b.isDate,P=Math.floor,Q=Math.abs,R=(Math.max,Math.min),S=Array.prototype,T=(S.indexOf,S.forEach),U=S.map,V=S.reduce,W=S.reduceRight,X=S.filter,Y=S.every,Z=S.some,$=c.argsToArray,_=function(){var a=function(a,b){return k(a,b)},b=function(a,b){return a-b},c=function(a,b){return a.getTime()-b.getTime()};return function(d,e){var f=[];return N(d)&&(f=d.slice(),e?"function"==typeof e?f.sort(e):f.sort(function(a,b){var c=a[e],d=b[e];return M(c)&&M(d)?c>d?1:d>c?-1:0:O(c)&&O(d)?c.getTime()-d.getTime():c-d}):a(f,M)?f.sort():a(f,O)?f.sort(c):f.sort(b)),f}}(),ab={toArray:p,sum:q,avg:r,sort:s,min:t,max:u,difference:v,removeDuplicates:w,unique:x,rotate:y,permutations:z,zip:A,transpose:B,valuesAt:C,union:D,intersect:E,powerSet:F,cartesian:G,compact:H,multiply:I,flatten:J,pluck:K,invoke:L,forEach:j,map:m,filter:i,reduce:n,reduceRight:o,some:l,every:k,indexOf:g,lastIndexOf:h};return a.define(N,ab).expose(ab)}"undefined"!=typeof exports?"undefined"!=typeof module&&module.exports&&(module.exports=a(require("extended"),require("is-extended"),require("arguments-extended"))):"function"==typeof define&&define.amd?define(["extended","is-extended","arguments-extended"],function(b,c,d){return a(b,c,d)}):this.arrayExtended=a(this.extended,this.isExtended,this.argumentsExtended)}.call(this);
{
"name": "array-extended",
"version": "0.0.9",
"version": "0.0.10",
"description": "Additional array extensions with a chainable api",

@@ -33,12 +33,12 @@ "main": "index.js",

"extended": "~0.0.3",
"is-extended": "~0.0.3",
"is-extended": "~0.0.3"
},
"devDependencies": {
"it": "~0.2.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.4.3",
"arguments-extended": "~0.0.3"
},
"devDependencies": {
"it": "~0.2.0",
"arguments-extended": "~0.0.3",
"grunt-it": "~0.3.0"
}
}
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