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

collect.js

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collect.js - npm Package Compare versions

Comparing version 4.0.30 to 4.1.0

2

build/collect.min.js

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

var collect=function(t){function r(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.l=!0,i.exports}var n={};return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=4)}([function(t,r,n){"use strict";function e(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}t.exports=function(t){var r=[];return Array.isArray(t)?r.push.apply(r,e(t)):"Collection"===t.constructor.name?r.push.apply(r,e(t.all())):Object.keys(t).forEach(function(n){return r.push(t[n])}),r}},function(t,r,n){"use strict";t.exports=function(t,r){try{return r.split(".").reduce(function(t,r){return t[r]},t)}catch(t){return null}}},function(t,r,n){"use strict";t.exports=function(t){return Array.isArray(t[0])?t[0]:t}},function(t,r,n){"use strict";t.exports=function(t){return void 0===t?this.sum()/this.items.length:new this.constructor(this.items).pluck(t).sum()/this.items.length}},function(t,r,n){"use strict";function e(t){this.items=t||[]}var i=n(5);"undefined"!=typeof Symbol&&(e.prototype[Symbol.iterator]=i),e.prototype.all=n(6),e.prototype.average=n(3),e.prototype.avg=n(3),e.prototype.chunk=n(7),e.prototype.collapse=n(8),e.prototype.combine=n(9),e.prototype.concat=n(10),e.prototype.contains=n(11),e.prototype.count=n(12),e.prototype.crossJoin=n(13),e.prototype.dd=n(14),e.prototype.diff=n(16),e.prototype.diffAssoc=n(17),e.prototype.diffKeys=n(18),e.prototype.dump=n(19),e.prototype.each=n(20),e.prototype.eachSpread=n(21),e.prototype.every=n(22),e.prototype.except=n(23),e.prototype.filter=n(24),e.prototype.first=n(25),e.prototype.firstWhere=n(26),e.prototype.flatMap=n(27),e.prototype.flatten=n(28),e.prototype.flip=n(29),e.prototype.forPage=n(30),e.prototype.forget=n(31),e.prototype.get=n(32),e.prototype.groupBy=n(33),e.prototype.has=n(34),e.prototype.implode=n(35),e.prototype.intersect=n(36),e.prototype.intersectByKeys=n(37),e.prototype.isEmpty=n(38),e.prototype.isNotEmpty=n(39),e.prototype.keyBy=n(40),e.prototype.keys=n(41),e.prototype.last=n(42),e.prototype.macro=n(43),e.prototype.map=n(44),e.prototype.mapSpread=n(45),e.prototype.mapToDictionary=n(46),e.prototype.mapInto=n(47),e.prototype.mapToGroups=n(48),e.prototype.mapWithKeys=n(49),e.prototype.max=n(50),e.prototype.median=n(51),e.prototype.merge=n(52),e.prototype.min=n(53),e.prototype.mode=n(54),e.prototype.nth=n(55),e.prototype.only=n(56),e.prototype.pad=n(57),e.prototype.partition=n(59),e.prototype.pipe=n(60),e.prototype.pluck=n(61),e.prototype.pop=n(62),e.prototype.prepend=n(63),e.prototype.pull=n(64),e.prototype.push=n(65),e.prototype.put=n(66),e.prototype.random=n(67),e.prototype.reduce=n(68),e.prototype.reject=n(69),e.prototype.reverse=n(70),e.prototype.search=n(71),e.prototype.shift=n(72),e.prototype.shuffle=n(73),e.prototype.slice=n(74),e.prototype.sort=n(75),e.prototype.sortBy=n(76),e.prototype.sortByDesc=n(77),e.prototype.splice=n(78),e.prototype.split=n(79),e.prototype.sum=n(80),e.prototype.take=n(81),e.prototype.tap=n(82),e.prototype.times=n(83),e.prototype.toArray=n(84),e.prototype.toJson=n(85),e.prototype.transform=n(86),e.prototype.unless=n(87),e.prototype.union=n(88),e.prototype.unique=n(89),e.prototype.unwrap=n(90),e.prototype.values=n(91),e.prototype.when=n(92),e.prototype.where=n(93),e.prototype.whereIn=n(94),e.prototype.whereNotIn=n(95),e.prototype.wrap=n(96),e.prototype.zip=n(97);var o=function(t){return new e(t)};t.exports=o,t.exports.default=o},function(t,r,n){"use strict";t.exports=function(){var t=this,r=-1;return{next:function(){return r+=1,{value:t.items[r],done:r>=t.items.length}}}}},function(t,r,n){"use strict";t.exports=function(){return this.items}},function(t,r,n){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var r=this,n=[],i=0;if(Array.isArray(this.items))do{var o=this.items.slice(i,i+t),s=new this.constructor(o);n.push(s),i+=t}while(i<this.items.length);else if("object"===e(this.items)){var u=Object.keys(this.items),c=function(){var e=u.slice(i,i+t),o=new r.constructor({});e.forEach(function(t){return o.put(t,r.items[t])}),n.push(o),i+=t};do{c()}while(i<u.length)}else n.push(new this.constructor([this.items]));return new this.constructor(n)}},function(t,r,n){"use strict";t.exports=function(){var t;return new this.constructor((t=[]).concat.apply(t,function(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}(this.items)))}},function(t,r,n){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var r=this,n=t;n instanceof this.constructor&&(n=t.all());var i={};return Array.isArray(this.items)&&Array.isArray(n)?this.items.forEach(function(t,r){i[t]=n[r]}):"object"===e(this.items)&&"object"===(void 0===n?"undefined":e(n))?Object.keys(this.items).forEach(function(t,e){i[r.items[t]]=n[Object.keys(n)[e]]}):Array.isArray(this.items)?i[this.items[0]]=n:"string"==typeof this.items&&Array.isArray(n)?i[this.items]=n[0]:"string"==typeof this.items&&(i[this.items]=n),new this.constructor(i)}},function(t,r,n){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var r=this,n=t;return t instanceof this.constructor?n=t.all():"object"===(void 0===t?"undefined":e(t))&&(n=[],Object.keys(t).forEach(function(r){n.push(t[r])})),n.forEach(function(t){"object"===(void 0===t?"undefined":e(t))?Object.keys(t).forEach(function(n){return r.items.push(t[n])}):r.items.push(t)}),this}},function(t,r,n){"use strict";var e=n(0);t.exports=function(t,r){if(void 0!==r)return Array.isArray(this.items)?this.items.filter(function(n){return void 0!==n[t]&&n[t]===r}).length>0:void 0!==this.items[t]&&this.items[t]===r;if("function"==typeof t)return this.items.filter(function(r,n){return t(r,n)}).length>0;if(Array.isArray(this.items))return-1!==this.items.indexOf(t);var n=e(this.items);return n.push.apply(n,function(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}(Object.keys(this.items))),-1!==n.indexOf(t)}},function(t,r,n){"use strict";t.exports=function(){var t=0;return Array.isArray(this.items)&&(t=this.items.length),Math.max(Object.keys(this.items).length,t)}},function(t,r,n){"use strict";t.exports=function(){function t(r,n,e){var i=e[0];i instanceof n&&(i=i.all());for(var o=e.slice(1),s=!o.length,u=[],c=0;c<i.length;c+=1){var f=r.slice();f.push(i[c]),s?u.push(f):u=u.concat(t(f,n,o))}return u}for(var r=arguments.length,n=Array(r),e=0;e<r;e++)n[e]=arguments[e];return new this.constructor(t([],this.constructor,[].concat([this.items],n)))}},function(t,r,n){"use strict";(function(r){t.exports=function(){this.dump(),void 0!==r&&r.exit(1)}}).call(r,n(15))},function(t,r){function n(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function i(t){if(f===setTimeout)return setTimeout(t,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(r){try{return f.call(null,t,0)}catch(r){return f.call(this,t,0)}}}function o(){l&&p&&(l=!1,p.length?y=p.concat(y):m=-1,y.length&&s())}function s(){if(!l){var t=i(o);l=!0;for(var r=y.length;r;){for(p=y,y=[];++m<r;)p&&p[m].run();m=-1,r=y.length}p=null,l=!1,function(t){if(a===clearTimeout)return clearTimeout(t);if((a===e||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(t);try{a(t)}catch(r){try{return a.call(null,t)}catch(r){return a.call(this,t)}}}(t)}}function u(t,r){this.fun=t,this.array=r}function c(){}var f,a,h=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(t){f=n}try{a="function"==typeof clearTimeout?clearTimeout:e}catch(t){a=e}}();var p,y=[],l=!1,m=-1;h.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)r[n-1]=arguments[n];y.push(new u(t,r)),1!==y.length||l||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,r,n){"use strict";t.exports=function(t){var r=void 0;r=t instanceof this.constructor?t.all():t;var n=this.items.filter(function(t){return-1===r.indexOf(t)});return new this.constructor(n)}},function(t,r,n){"use strict";t.exports=function(t){var r=this,n=t;t instanceof this.constructor&&(n=t.all());var e={};return Object.keys(this.items).forEach(function(t){void 0!==n[t]&&n[t]===r.items[t]||(e[t]=r.items[t])}),new this.constructor(e)}},function(t,r,n){"use strict";t.exports=function(t){var r=void 0;r=t instanceof this.constructor?t.all():t;var n=Object.keys(r),e=Object.keys(this.items).filter(function(t){return-1===n.indexOf(t)});return new this.constructor(this.items).only(e)}},function(t,r,n){"use strict";t.exports=function(){return console.log(this),this}},function(t,r,n){"use strict";t.exports=function(t){var r=this;return Array.isArray(this.items)?this.items.forEach(t):Object.keys(this.items).forEach(function(n){t(r.items[n],n,r.items)}),this}},function(t,r,n){"use strict";t.exports=function(t){return this.each(function(r,n){t.apply(void 0,function(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}(r).concat([n]))}),this}},function(t,r,n){"use strict";var e=n(0);t.exports=function(t){return-1===e(this.items).map(function(r,n){return t(r,n)}).indexOf(!1)}},function(t,r,n){"use strict";var e=n(2);t.exports=function(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var o=e(n);if(Array.isArray(this.items)){var s=this.items.filter(function(t){return-1===o.indexOf(t)});return new this.constructor(s)}var u={};return Object.keys(this.items).forEach(function(r){-1===o.indexOf(r)&&(u[r]=t.items[r])}),new this.constructor(u)}},function(t,r,n){"use strict";function e(t){if(Array.isArray(t)){if(t.length)return!1}else if(void 0!==t&&null!==t&&"object"===(void 0===t?"undefined":i(t))){if(Object.keys(t).length)return!1}else if(t)return!1;return!0}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var r=t||!1,n=null;return n=Array.isArray(this.items)?function(t,r){if(t)return r.filter(t);for(var n=[],i=0;i<r.length;i+=1){var o=r[i];e(o)||n.push(o)}return n}(r,this.items):function(t,r){var n={};return Object.keys(r).forEach(function(i){t?t(r[i],i)&&(n[i]=r[i]):e(r[i])||(n[i]=r[i])}),n}(r,this.items),new this.constructor(n)}},function(t,r,n){"use strict";t.exports=function(t,r){if("function"==typeof t){for(var n=0,e=this.items.length;n<e;n+=1){var i=this.items[n];if(t(i))return i}return"function"==typeof r?r():r}if(Array.isArray(this.items)&&this.items.length||Object.keys(this.items).length){if(Array.isArray(this.items))return this.items[0];var o=Object.keys(this.items)[0];return this.items[o]}return"function"==typeof r?r():r}},function(t,r,n){"use strict";t.exports=function(t,r){return this.where(t,r).first()||null}},function(t,r,n){"use strict";t.exports=function(t){var r=[];return this.items.forEach(function(n,e){var i=Object.keys(n),o=[];i.forEach(function(t){o.push(n[t])});var s=t(o,e),u={};i.forEach(function(t,r){u[t]=s[r]}),r.push(u)}),new this.constructor(Object.assign.apply(Object,r))}},function(t,r,n){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var r=t||1/0,n=!1,i=[],o=function(t){i=[],Array.isArray(t)?t.forEach(function(t){"string"==typeof t?i.push(t):Array.isArray(t)?i=i.concat(t):Object.keys(t).forEach(function(r){i=i.concat(t[r])})}):Object.keys(t).forEach(function(r){"string"==typeof t[r]?i.push(t[r]):Array.isArray(t[r])?i=i.concat(t[r]):Object.keys(t).forEach(function(r){i=i.concat(t[r])})}),n=0===(n=i.filter(function(t){return"object"===(void 0===t?"undefined":e(t))})).length,r-=1};for(o(this.items);!n&&r>0;)o(i);return new this.constructor(i)}},function(t,r,n){"use strict";t.exports=function(){var t=this,r={};return Array.isArray(this.items)?Object.keys(this.items).forEach(function(n){r[t.items[n]]=Number(n)}):Object.keys(this.items).forEach(function(n){r[t.items[n]]=n}),new this.constructor(r)}},function(t,r,n){"use strict";t.exports=function(t,r){var n=this,e={};return Array.isArray(this.items)?e=this.items.slice(t*r-r,t*r):Object.keys(this.items).slice(t*r-r,t*r).forEach(function(t){e[t]=n.items[t]}),new this.constructor(e)}},function(t,r,n){"use strict";t.exports=function(t){return Array.isArray(this.items)?this.items.splice(t,1):delete this.items[t],this}},function(t,r,n){"use strict";t.exports=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return void 0!==this.items[t]?this.items[t]:"function"==typeof r?r():null!==r?r:null}},function(t,r,n){"use strict";t.exports=function(t){var r=this,n={};return this.items.forEach(function(e,i){var o=void 0;o="function"==typeof t?t(e,i):e[t]||"",void 0===n[o]&&(n[o]=new r.constructor([])),n[o].push(e)}),new this.constructor(n)}},function(t,r,n){"use strict";var e=n(2);t.exports=function(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var o=e(n);return o.filter(function(r){return t.items[r]}).length===o.length}},function(t,r,n){"use strict";t.exports=function(t,r){return void 0===r?this.items.join(t):new this.constructor(this.items).pluck(t).all().join(r)}},function(t,r,n){"use strict";t.exports=function(t){var r=t;t instanceof this.constructor&&(r=t.all());var n=this.items.filter(function(t){return-1!==r.indexOf(t)});return new this.constructor(n)}},function(t,r,n){"use strict";t.exports=function(t){var r=this,n=Object.keys(t);t instanceof this.constructor&&(n=Object.keys(t.all()));var e={};return Object.keys(this.items).forEach(function(t){-1!==n.indexOf(t)&&(e[t]=r.items[t])}),new this.constructor(e)}},function(t,r,n){"use strict";t.exports=function(){return!this.items.length}},function(t,r,n){"use strict";t.exports=function(){return!!this.items.length}},function(t,r,n){"use strict";t.exports=function(t){var r={};return"function"==typeof t?this.items.forEach(function(n){r[t(n)]=n}):this.items.forEach(function(n){r[n[t]||""]=n}),new this.constructor(r)}},function(t,r,n){"use strict";t.exports=function(){var t=Object.keys(this.items);return Array.isArray(this.items)&&(t=t.map(Number)),new this.constructor(t)}},function(t,r,n){"use strict";t.exports=function(t,r){var n=this.items;if("function"==typeof t&&(n=this.filter(t).all()),Array.isArray(n)&&!n.length||!Object.keys(n).length)return"function"==typeof r?r():r;if(Array.isArray(n))return n[n.length-1];var e=Object.keys(n);return n[e[e.length-1]]}},function(t,r,n){"use strict";t.exports=function(t,r){this.constructor.prototype[t]=r}},function(t,r,n){"use strict";t.exports=function(t){var r=this;if(Array.isArray(this.items))return new this.constructor(this.items.map(t));var n={};return Object.keys(this.items).forEach(function(e){n[e]=t(r.items[e],e)}),new this.constructor(n)}},function(t,r,n){"use strict";t.exports=function(t){return this.map(function(r,n){return t.apply(void 0,function(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}(r).concat([n]))})}},function(t,r,n){"use strict";var e=function(){return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var n=[],e=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(e=(s=u.next()).done)&&(n.push(s.value),!r||n.length!==r);e=!0);}catch(t){i=!0,o=t}finally{try{!e&&u.return&&u.return()}finally{if(i)throw o}}return n}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.exports=function(t){var r={};return this.items.forEach(function(n,i){var o=t(n,i),s=e(o,2),u=s[0],c=s[1];void 0===r[u]?r[u]=[c]:r[u].push(c)}),new this.constructor(r)}},function(t,r,n){"use strict";t.exports=function(t){return this.map(function(r,n){return new t(r,n)})}},function(t,r,n){"use strict";var e=function(){return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var n=[],e=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(e=(s=u.next()).done)&&(n.push(s.value),!r||n.length!==r);e=!0);}catch(t){i=!0,o=t}finally{try{!e&&u.return&&u.return()}finally{if(i)throw o}}return n}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.exports=function(t){var r={};return this.items.forEach(function(n,i){var o=t(n,i),s=e(o,2),u=s[0],c=s[1];void 0===r[u]?r[u]=[c]:r[u].push(c)}),new this.constructor(r)}},function(t,r,n){"use strict";var e=function(){return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var n=[],e=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(e=(s=u.next()).done)&&(n.push(s.value),!r||n.length!==r);e=!0);}catch(t){i=!0,o=t}finally{try{!e&&u.return&&u.return()}finally{if(i)throw o}}return n}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.exports=function(t){var r=this,n={};return Array.isArray(this.items)?this.items.forEach(function(r){var i=t(r),o=e(i,2),s=o[0],u=o[1];n[s]=u}):Object.keys(this.items).forEach(function(i){var o=t(r.items[i]),s=e(o,2),u=s[0],c=s[1];n[u]=c}),new this.constructor(n)}},function(t,r,n){"use strict";function e(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}t.exports=function(t){return"string"==typeof t?Math.max.apply(Math,e(this.pluck(t).all())):Math.max.apply(Math,e(this.items))}},function(t,r,n){"use strict";t.exports=function(t){var r=this.items.length;return void 0===t?r%2==0?(this.items[r/2-1]+this.items[r/2])/2:this.items[Math.floor(r/2)]:r%2==0?(this.items[r/2-1][t]+this.items[r/2][t])/2:this.items[Math.floor(r/2)][t]}},function(t,r,n){"use strict";t.exports=function(t){var r=t;if("string"==typeof r&&(r=[r]),Array.isArray(this.items)&&Array.isArray(r))return new this.constructor(this.items.concat(r));var n=JSON.parse(JSON.stringify(this.items));return Object.keys(r).forEach(function(t){n[t]=r[t]}),new this.constructor(n)}},function(t,r,n){"use strict";function e(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}t.exports=function(t){return void 0!==t?Math.min.apply(Math,e(this.pluck(t).all())):Math.min.apply(Math,e(this.items))}},function(t,r,n){"use strict";t.exports=function(t){var r=[],n=1;return this.items.length?(this.items.forEach(function(e){var i=r.filter(function(r){return void 0!==t?r.key===e[t]:r.key===e});if(i.length){i[0].count+=1;var o=i[0].count;o>n&&(n=o)}else void 0!==t?r.push({key:e[t],count:1}):r.push({key:e,count:1})}),r.filter(function(t){return t.count===n}).map(function(t){return t.key})):null}},function(t,r,n){"use strict";var e=n(0);t.exports=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e(this.items).slice(r).filter(function(r,n){return n%t==0});return new this.constructor(n)}},function(t,r,n){"use strict";var e=n(2);t.exports=function(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var o=e(n);if(Array.isArray(this.items)){var s=this.items.filter(function(t){return-1!==o.indexOf(t)});return new this.constructor(s)}var u={};return Object.keys(this.items).forEach(function(r){-1!==o.indexOf(r)&&(u[r]=t.items[r])}),new this.constructor(u)}},function(t,r,n){"use strict";var e=n(58);t.exports=function(t,r){var n=Math.abs(t),i=this.count();if(n<=i)return this;for(var o=n-i,s=e(this.items),u=Array.isArray(this.items),c=t<0,f=0;f<o;)u?c?s.unshift(r):s.push(r):void 0!==s[f]?o+=1:s[f]=r,f+=1;return new this.constructor(s)}},function(t,r,n){"use strict";t.exports=function(t){var r=void 0;if(Array.isArray(t)){var n;(n=r=[]).push.apply(n,function(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}(t))}else r={},Object.keys(t).forEach(function(n){r[n]=t[n]});return r}},function(t,r,n){"use strict";t.exports=function(t){var r=this,n=void 0;return Array.isArray(this.items)?(n=[new this.constructor([]),new this.constructor([])],this.items.forEach(function(r){!0===t(r)?n[0].push(r):n[1].push(r)})):(n=[new this.constructor({}),new this.constructor({})],Object.keys(this.items).forEach(function(e){var i=r.items[e];!0===t(i)?n[0].put(e,i):n[1].put(e,i)})),new this.constructor(n)}},function(t,r,n){"use strict";t.exports=function(t){return t(this)}},function(t,r,n){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(1);t.exports=function(t,r){if(-1!==t.indexOf("*")){var n=function(t){var r={};return t.forEach(function(t,n){function i(t,n){"object"===(void 0===t?"undefined":e(t))&&Object.keys(t).forEach(function(r){i(t[r],n+"."+r)}),r[n]=t}i(t,n)}),r}(this.items),o=[];if(void 0!==r){var s=new RegExp("0."+r,"g"),u=("0."+r).split(".").length;Object.keys(n).forEach(function(t){var r=t.match(s);if(r){var e=r[0];e.split(".").length===u&&o.push(n[e])}})}var c=[],f=new RegExp("0."+t,"g"),a=("0."+t).split(".").length;if(Object.keys(n).forEach(function(t){var r=t.match(f);if(r){var e=r[0];e.split(".").length===a&&c.push(n[e])}}),void 0!==r){var h={};return this.items.forEach(function(t,r){h[o[r]||""]=c}),new this.constructor(h)}return new this.constructor([c])}if(void 0!==r){var p={};return this.items.forEach(function(n){void 0!==i(n,t)?p[n[r]||""]=i(n,t):p[n[r]||""]=null}),new this.constructor(p)}return this.map(function(r){return void 0!==i(r,t)?i(r,t):null})}},function(t,r,n){"use strict";t.exports=function(){if(Array.isArray(this.items))return this.items.pop();var t=Object.keys(this.items),r=t[t.length-1],n=this.items[r];return delete this.items[r],n}},function(t,r,n){"use strict";t.exports=function(t,r){return void 0!==r?this.put(r,t):(this.items.unshift(t),this)}},function(t,r,n){"use strict";t.exports=function(t,r){var n=this.items[t]||null;return n||void 0===r||(n="function"==typeof r?r():r),delete this.items[t],n}},function(t,r,n){"use strict";t.exports=function(){var t;return(t=this.items).push.apply(t,arguments),this}},function(t,r,n){"use strict";t.exports=function(t,r){return this.items[t]=r,this}},function(t,r,n){"use strict";var e=n(0);t.exports=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=e(this.items),n=new this.constructor(r).shuffle();return 1===t?n.first():n.take(t)}},function(t,r,n){"use strict";t.exports=function(t,r){var n=this,e=null;return void 0!==r&&(e=r),Array.isArray(this.items)?this.items.forEach(function(r){e=t(e,r)}):Object.keys(this.items).forEach(function(r){e=t(e,n.items[r],r)}),e}},function(t,r,n){"use strict";t.exports=function(t){return new this.constructor(this.items.filter(function(r){return!t(r)}))}},function(t,r,n){"use strict";t.exports=function(){var t=[].concat(this.items).reverse();return new this.constructor(t)}},function(t,r,n){"use strict";t.exports=function(t,r){var n=this,e=t;"function"==typeof t&&(e=this.items.filter(function(r,n){return t(r,n)})[0]);var i=!1;if(!Array.isArray(this.items))return Object.keys(this.items).filter(function(t){return!0===r?n.items[t]===e:n.items[t]===Number(e)||n.items[t]===e.toString()})[0]||!1;var o=this.items.filter(function(t){return!0===r?t===e:t===Number(e)||t===e.toString()})[0];return-1!==(i=this.items.indexOf(o))&&i}},function(t,r,n){"use strict";t.exports=function(){if(Array.isArray(this.items))return this.items.shift();var t=Object.keys(this.items)[0],r=this.items[t]||null;return delete this.items[t],r}},function(t,r,n){"use strict";var e=n(0);t.exports=function(){var t=e(this.items),r=void 0,n=void 0,i=void 0;for(i=t.length;i;i-=1)r=Math.floor(Math.random()*i),n=t[i-1],t[i-1]=t[r],t[r]=n;return this.items=t,this}},function(t,r,n){"use strict";t.exports=function(t,r){var n=this.items.slice(t);return void 0!==r&&(n=n.slice(0,r)),new this.constructor(n)}},function(t,r,n){"use strict";t.exports=function(t){var r=[].concat(this.items);return void 0===t?this.every(function(t){return"number"==typeof t})?r.sort(function(t,r){return t-r}):r.sort():r.sort(t),new this.constructor(r)}},function(t,r,n){"use strict";t.exports=function(t){var r=[].concat(this.items);return"function"==typeof t?r.sort(function(r,n){return t(r)<t(n)?-1:t(r)>t(n)?1:0}):r.sort(function(r,n){return r[t]<n[t]?-1:r[t]>n[t]?1:0}),new this.constructor(r)}},function(t,r,n){"use strict";t.exports=function(t){return this.sortBy(t).reverse()}},function(t,r,n){"use strict";t.exports=function(t,r,n){var e=this.slice(t,r);if(this.items=this.diff(e.all()).all(),Array.isArray(n))for(var i=0,o=n.length;i<o;i+=1)this.items.splice(t+i,0,n[i]);return e}},function(t,r,n){"use strict";t.exports=function(t){for(var r=Math.round(this.items.length/t),n=JSON.parse(JSON.stringify(this.items)),e=[],i=0;i<t;i+=1)e.push(new this.constructor(n.splice(0,r)));return new this.constructor(e)}},function(t,r,n){"use strict";t.exports=function(t){var r=0;if(void 0===t)for(var n=0,e=this.items.length;n<e;n+=1)r+=this.items[n];else if("function"==typeof t)for(var i=0,o=this.items.length;i<o;i+=1)r+=t(this.items[i]);else for(var s=0,u=this.items.length;s<u;s+=1)r+=this.items[s][t];return r}},function(t,r,n){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var r=this;if(!Array.isArray(this.items)&&"object"===e(this.items)){var n=Object.keys(this.items),i=void 0;i=t<0?n.slice(t):n.slice(0,t);var o={};return n.forEach(function(t){-1!==i.indexOf(t)&&(o[t]=r.items[t])}),new this.constructor(o)}return t<0?new this.constructor(this.items.slice(t)):new this.constructor(this.items.slice(0,t))}},function(t,r,n){"use strict";t.exports=function(t){return t(this),this}},function(t,r,n){"use strict";t.exports=function(t,r){for(var n=1;n<=t;n+=1)this.items.push(r(n));return this}},function(t,r,n){"use strict";t.exports=function(){function t(n,e){var i=[];n instanceof r?(n.items.forEach(function(r){return t(r,i)}),e.push(i)):Array.isArray(n)?(n.forEach(function(r){return t(r,i)}),e.push(i)):e.push(n)}var r=this.constructor;if(Array.isArray(this.items)){var n=[];return this.items.forEach(function(r){t(r,n)}),n}return this.values().all()}},function(t,r,n){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(){return"object"!==e(this.items)||Array.isArray(this.items)?JSON.stringify(this.toArray()):JSON.stringify(this.all())}},function(t,r,n){"use strict";t.exports=function(t){var r=this;if(Array.isArray(this.items))this.items=this.items.map(t);else{var n={};Object.keys(this.items).forEach(function(e){n[e]=t(r.items[e],e)}),this.items=n}return this}},function(t,r,n){"use strict";t.exports=function(t,r,n){t?n(this):r(this)}},function(t,r,n){"use strict";t.exports=function(t){var r=this,n=JSON.parse(JSON.stringify(this.items));return Object.keys(t).forEach(function(e){void 0===r.items[e]&&(n[e]=t[e])}),new this.constructor(n)}},function(t,r,n){"use strict";t.exports=function(t){var r=void 0;if(void 0===t)r=this.items.filter(function(t,r,n){return n.indexOf(t)===r});else{r=[];for(var n=[],e=0,i=this.items.length;e<i;e+=1){var o=void 0;o="function"==typeof t?t(this.items[e]):this.items[e][t],-1===n.indexOf(o)&&(r.push(this.items[e]),n.push(o))}}return new this.constructor(r)}},function(t,r,n){"use strict";t.exports=function(t){return t instanceof this.constructor?t.all():t}},function(t,r,n){"use strict";t.exports=function(){var t=this,r=[];return Object.keys(this.items).forEach(function(n){r.push(t.items[n])}),new this.constructor(r)}},function(t,r,n){"use strict";t.exports=function(t,r,n){return t?r(this,t):n?n(this,t):this}},function(t,r,n){"use strict";var e=n(0),i=n(1);t.exports=function(t,r,n){var o=r,s=n;void 0===n&&(s=r,o="===");var u=e(this.items).filter(function(r){switch(o){case"==":return i(r,t)===Number(s)||i(r,t)===s.toString();default:case"===":return i(r,t)===s;case"!=":case"<>":return i(r,t)!==Number(s)&&i(r,t)!==s.toString();case"!==":return i(r,t)!==s;case"<":return i(r,t)<s;case"<=":return i(r,t)<=s;case">":return i(r,t)>s;case">=":return i(r,t)>=s}});return new this.constructor(u)}},function(t,r,n){"use strict";var e=n(0),i=n(1);t.exports=function(t,r){var n=e(r),o=this.items.filter(function(r){return-1!==n.indexOf(i(r,t))});return new this.constructor(o)}},function(t,r,n){"use strict";var e=n(0),i=n(1);t.exports=function(t,r){var n=e(r),o=this.items.filter(function(r){return-1===n.indexOf(i(r,t))});return new this.constructor(o)}},function(t,r,n){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return t instanceof this.constructor?t:"object"===(void 0===t?"undefined":e(t))?new this.constructor(t):new this.constructor([t])}},function(t,r,n){"use strict";t.exports=function(t){var r=this,n=t;n instanceof this.constructor&&(n=n.all());var e=this.items.map(function(t,e){return new r.constructor([t,n[e]])});return new this.constructor(e)}}]);
var collect=function(e){var n={};function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=n,i.d=function(t,r,e){i.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},i.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(r,"a",r),r},i.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},i.p="",i(i.s=4)}([function(t,r,e){"use strict";function n(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}t.exports=function(r){var e=[];return Array.isArray(r)?e.push.apply(e,n(r)):"Collection"===r.constructor.name?e.push.apply(e,n(r.all())):Object.keys(r).forEach(function(t){return e.push(r[t])}),e}},function(t,r,e){"use strict";t.exports=function(t,r){try{return r.split(".").reduce(function(t,r){return t[r]},t)}catch(t){return null}}},function(t,r,e){"use strict";t.exports=function(t){return Array.isArray(t[0])?t[0]:t}},function(t,r,e){"use strict";t.exports=function(t){return void 0===t?this.sum()/this.items.length:new this.constructor(this.items).pluck(t).sum()/this.items.length}},function(t,r,e){"use strict";function n(t){this.items=t||[]}var i=e(5);"undefined"!=typeof Symbol&&(n.prototype[Symbol.iterator]=i),n.prototype.all=e(6),n.prototype.average=e(3),n.prototype.avg=e(3),n.prototype.chunk=e(7),n.prototype.collapse=e(8),n.prototype.combine=e(9),n.prototype.concat=e(10),n.prototype.contains=e(11),n.prototype.count=e(12),n.prototype.crossJoin=e(13),n.prototype.dd=e(14),n.prototype.diff=e(16),n.prototype.diffAssoc=e(17),n.prototype.diffKeys=e(18),n.prototype.dump=e(19),n.prototype.each=e(20),n.prototype.eachSpread=e(21),n.prototype.every=e(22),n.prototype.except=e(23),n.prototype.filter=e(24),n.prototype.first=e(25),n.prototype.firstWhere=e(26),n.prototype.flatMap=e(27),n.prototype.flatten=e(28),n.prototype.flip=e(29),n.prototype.forPage=e(30),n.prototype.forget=e(31),n.prototype.get=e(32),n.prototype.groupBy=e(33),n.prototype.has=e(34),n.prototype.implode=e(35),n.prototype.intersect=e(36),n.prototype.intersectByKeys=e(37),n.prototype.isEmpty=e(38),n.prototype.isNotEmpty=e(39),n.prototype.keyBy=e(40),n.prototype.keys=e(41),n.prototype.last=e(42),n.prototype.macro=e(43),n.prototype.map=e(44),n.prototype.mapSpread=e(45),n.prototype.mapToDictionary=e(46),n.prototype.mapInto=e(47),n.prototype.mapToGroups=e(48),n.prototype.mapWithKeys=e(49),n.prototype.max=e(50),n.prototype.median=e(51),n.prototype.merge=e(52),n.prototype.min=e(53),n.prototype.mode=e(54),n.prototype.nth=e(55),n.prototype.only=e(56),n.prototype.pad=e(57),n.prototype.partition=e(59),n.prototype.pipe=e(60),n.prototype.pluck=e(61),n.prototype.pop=e(62),n.prototype.prepend=e(63),n.prototype.pull=e(64),n.prototype.push=e(65),n.prototype.put=e(66),n.prototype.random=e(67),n.prototype.reduce=e(68),n.prototype.reject=e(69),n.prototype.reverse=e(70),n.prototype.search=e(71),n.prototype.shift=e(72),n.prototype.shuffle=e(73),n.prototype.slice=e(74),n.prototype.sort=e(75),n.prototype.sortBy=e(76),n.prototype.sortByDesc=e(77),n.prototype.splice=e(78),n.prototype.split=e(79),n.prototype.sum=e(80),n.prototype.take=e(81),n.prototype.tap=e(82),n.prototype.times=e(83),n.prototype.toArray=e(84),n.prototype.toJson=e(85),n.prototype.transform=e(86),n.prototype.unless=e(87),n.prototype.union=e(88),n.prototype.unique=e(89),n.prototype.unwrap=e(90),n.prototype.values=e(91),n.prototype.when=e(92),n.prototype.where=e(93),n.prototype.whereIn=e(94),n.prototype.whereNotIn=e(95),n.prototype.wrap=e(96),n.prototype.zip=e(97);var o=function(t){return new n(t)};t.exports=o,t.exports.default=o},function(t,r,e){"use strict";t.exports=function(){var t=this,r=-1;return{next:function(){return r+=1,{value:t.items[r],done:r>=t.items.length}}}}},function(t,r,e){"use strict";t.exports=function(){return this.items}},function(t,r,e){"use strict";var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(e){var n=this,i=[],o=0;if(Array.isArray(this.items))do{var t=this.items.slice(o,o+e),r=new this.constructor(t);i.push(r),o+=e}while(o<this.items.length);else if("object"===c(this.items))for(var s=Object.keys(this.items),u=function(){var t=s.slice(o,o+e),r=new n.constructor({});t.forEach(function(t){return r.put(t,n.items[t])}),i.push(r),o+=e};u(),o<s.length;);else i.push(new this.constructor([this.items]));return new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(){var t;return new this.constructor((t=[]).concat.apply(t,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(this.items)))}},function(t,r,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var e=this,n=t;n instanceof this.constructor&&(n=t.all());var i={};return Array.isArray(this.items)&&Array.isArray(n)?this.items.forEach(function(t,r){i[t]=n[r]}):"object"===o(this.items)&&"object"===(void 0===n?"undefined":o(n))?Object.keys(this.items).forEach(function(t,r){i[e.items[t]]=n[Object.keys(n)[r]]}):Array.isArray(this.items)?i[this.items[0]]=n:"string"==typeof this.items&&Array.isArray(n)?i[this.items]=n[0]:"string"==typeof this.items&&(i[this.items]=n),new this.constructor(i)}},function(t,r,e){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(r){var e=this,n=r;return r instanceof this.constructor?n=r.all():"object"===(void 0===r?"undefined":i(r))&&(n=[],Object.keys(r).forEach(function(t){n.push(r[t])})),n.forEach(function(r){"object"===(void 0===r?"undefined":i(r))?Object.keys(r).forEach(function(t){return e.items.push(r[t])}):e.items.push(r)}),this}},function(t,r,e){"use strict";var n=e(0);t.exports=function(e,r){if(void 0!==r)return Array.isArray(this.items)?0<this.items.filter(function(t){return void 0!==t[e]&&t[e]===r}).length:void 0!==this.items[e]&&this.items[e]===r;if("function"==typeof e)return 0<this.items.filter(function(t,r){return e(t,r)}).length;if(Array.isArray(this.items))return-1!==this.items.indexOf(e);var t=n(this.items);return t.push.apply(t,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(Object.keys(this.items))),-1!==t.indexOf(e)}},function(t,r,e){"use strict";t.exports=function(){var t=0;return Array.isArray(this.items)&&(t=this.items.length),Math.max(Object.keys(this.items).length,t)}},function(t,r,e){"use strict";t.exports=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return new this.constructor(function t(r,e,n){var i=n[0];i instanceof e&&(i=i.all());for(var o=n.slice(1),s=!o.length,u=[],c=0;c<i.length;c+=1){var f=r.slice();f.push(i[c]),s?u.push(f):u=u.concat(t(f,e,o))}return u}([],this.constructor,[].concat([this.items],r)))}},function(r,t,e){"use strict";(function(t){r.exports=function(){this.dump(),void 0!==t&&t.exit(1)}}).call(t,e(15))},function(t,r){var e,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(r){if(e===setTimeout)return setTimeout(r,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(r,0);try{return e(r,0)}catch(t){try{return e.call(null,r,0)}catch(t){return e.call(this,r,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var c,f=[],a=!1,h=-1;function p(){a&&c&&(a=!1,c.length?f=c.concat(f):h=-1,f.length&&y())}function y(){if(!a){var t=u(p);a=!0;for(var r=f.length;r;){for(c=f,f=[];++h<r;)c&&c[h].run();h=-1,r=f.length}c=null,a=!1,function(r){if(n===clearTimeout)return clearTimeout(r);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(r);try{n(r)}catch(t){try{return n.call(null,r)}catch(t){return n.call(this,r)}}}(t)}}function l(t,r){this.fun=t,this.array=r}function m(){}i.nextTick=function(t){var r=new Array(arguments.length-1);if(1<arguments.length)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];f.push(new l(t,r)),1!==f.length||a||u(y)},l.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,r,e){"use strict";t.exports=function(t){var r=void 0;r=t instanceof this.constructor?t.all():t;var e=this.items.filter(function(t){return-1===r.indexOf(t)});return new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t){var r=this,e=t;t instanceof this.constructor&&(e=t.all());var n={};return Object.keys(this.items).forEach(function(t){void 0!==e[t]&&e[t]===r.items[t]||(n[t]=r.items[t])}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){var r=void 0;r=t instanceof this.constructor?t.all():t;var e=Object.keys(r),n=Object.keys(this.items).filter(function(t){return-1===e.indexOf(t)});return new this.constructor(this.items).only(n)}},function(t,r,e){"use strict";t.exports=function(){return console.log(this),this}},function(t,r,e){"use strict";t.exports=function(r){var e=this;return Array.isArray(this.items)?this.items.forEach(r):Object.keys(this.items).forEach(function(t){r(e.items[t],t,e.items)}),this}},function(t,r,e){"use strict";t.exports=function(e){return this.each(function(t,r){e.apply(void 0,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(t).concat([r]))}),this}},function(t,r,e){"use strict";var n=e(0);t.exports=function(e){return-1===n(this.items).map(function(t,r){return e(t,r)}).indexOf(!1)}},function(t,r,e){"use strict";var u=e(2);t.exports=function(){for(var r=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=u(e);if(Array.isArray(this.items)){var o=this.items.filter(function(t){return-1===i.indexOf(t)});return new this.constructor(o)}var s={};return Object.keys(this.items).forEach(function(t){-1===i.indexOf(t)&&(s[t]=r.items[t])}),new this.constructor(s)}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function s(t){if(Array.isArray(t)){if(t.length)return!1}else if(null!=t&&"object"===(void 0===t?"undefined":n(t))){if(Object.keys(t).length)return!1}else if(t)return!1;return!0}t.exports=function(t){var r,e,n,i=t||!1,o=null;return o=Array.isArray(this.items)?function(t,r){if(t)return r.filter(t);for(var e=[],n=0;n<r.length;n+=1){var i=r[n];s(i)||e.push(i)}return e}(i,this.items):(r=i,e=this.items,n={},Object.keys(e).forEach(function(t){r?r(e[t],t)&&(n[t]=e[t]):s(e[t])||(n[t]=e[t])}),n),new this.constructor(o)}},function(t,r,e){"use strict";t.exports=function(t,r){if("function"==typeof t){for(var e=0,n=this.items.length;e<n;e+=1){var i=this.items[e];if(t(i))return i}return"function"==typeof r?r():r}if(Array.isArray(this.items)&&this.items.length||Object.keys(this.items).length){if(Array.isArray(this.items))return this.items[0];var o=Object.keys(this.items)[0];return this.items[o]}return"function"==typeof r?r():r}},function(t,r,e){"use strict";t.exports=function(t,r){return this.where(t,r).first()||null}},function(t,r,e){"use strict";t.exports=function(t){return this.map(t).collapse()}},function(t,r,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var e=t||1/0,n=!1,i=[],r=function(r){i=[],Array.isArray(r)?r.forEach(function(r){"string"==typeof r?i.push(r):Array.isArray(r)?i=i.concat(r):Object.keys(r).forEach(function(t){i=i.concat(r[t])})}):Object.keys(r).forEach(function(t){"string"==typeof r[t]?i.push(r[t]):Array.isArray(r[t])?i=i.concat(r[t]):Object.keys(r).forEach(function(t){i=i.concat(r[t])})}),n=0===(n=i.filter(function(t){return"object"===(void 0===t?"undefined":o(t))})).length,e-=1};for(r(this.items);!n&&0<e;)r(i);return new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(){var r=this,e={};return Array.isArray(this.items)?Object.keys(this.items).forEach(function(t){e[r.items[t]]=Number(t)}):Object.keys(this.items).forEach(function(t){e[r.items[t]]=t}),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this,n={};return Array.isArray(this.items)?n=this.items.slice(t*r-r,t*r):Object.keys(this.items).slice(t*r-r,t*r).forEach(function(t){n[t]=e.items[t]}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){return Array.isArray(this.items)?this.items.splice(t,1):delete this.items[t],this}},function(t,r,e){"use strict";t.exports=function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return void 0!==this.items[t]?this.items[t]:"function"==typeof r?r():null!==r?r:null}},function(t,r,e){"use strict";t.exports=function(n){var i=this,o={};return this.items.forEach(function(t,r){var e=void 0;e="function"==typeof n?n(t,r):t[n]||"",void 0===o[e]&&(o[e]=new i.constructor([])),o[e].push(t)}),new this.constructor(o)}},function(t,r,e){"use strict";var o=e(2);t.exports=function(){for(var r=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=o(e);return i.filter(function(t){return r.items[t]}).length===i.length}},function(t,r,e){"use strict";t.exports=function(t,r){return void 0===r?this.items.join(t):new this.constructor(this.items).pluck(t).all().join(r)}},function(t,r,e){"use strict";t.exports=function(t){var r=t;t instanceof this.constructor&&(r=t.all());var e=this.items.filter(function(t){return-1!==r.indexOf(t)});return new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t){var r=this,e=Object.keys(t);t instanceof this.constructor&&(e=Object.keys(t.all()));var n={};return Object.keys(this.items).forEach(function(t){-1!==e.indexOf(t)&&(n[t]=r.items[t])}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(){return!this.items.length}},function(t,r,e){"use strict";t.exports=function(){return!!this.items.length}},function(t,r,e){"use strict";t.exports=function(r){var e={};return"function"==typeof r?this.items.forEach(function(t){e[r(t)]=t}):this.items.forEach(function(t){e[t[r]||""]=t}),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(){var t=Object.keys(this.items);return Array.isArray(this.items)&&(t=t.map(Number)),new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.items;if("function"==typeof t&&(e=this.filter(t).all()),Array.isArray(e)&&!e.length||!Object.keys(e).length)return"function"==typeof r?r():r;if(Array.isArray(e))return e[e.length-1];var n=Object.keys(e);return e[n[n.length-1]]}},function(t,r,e){"use strict";t.exports=function(t,r){this.constructor.prototype[t]=r}},function(t,r,e){"use strict";t.exports=function(r){var e=this;if(Array.isArray(this.items))return new this.constructor(this.items.map(r));var n={};return Object.keys(this.items).forEach(function(t){n[t]=r(e.items[t],t)}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(e){return this.map(function(t,r){return e.apply(void 0,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(t).concat([r]))})}},function(t,r,e){"use strict";var c=function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var e=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(e.push(s.value),!r||e.length!==r);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.exports=function(s){var u={};return this.items.forEach(function(t,r){var e=s(t,r),n=c(e,2),i=n[0],o=n[1];void 0===u[i]?u[i]=[o]:u[i].push(o)}),new this.constructor(u)}},function(t,r,e){"use strict";t.exports=function(e){return this.map(function(t,r){return new e(t,r)})}},function(t,r,e){"use strict";var c=function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var e=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(e.push(s.value),!r||e.length!==r);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.exports=function(s){var u={};return this.items.forEach(function(t,r){var e=s(t,r),n=c(e,2),i=n[0],o=n[1];void 0===u[i]?u[i]=[o]:u[i].push(o)}),new this.constructor(u)}},function(t,r,e){"use strict";var c=function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var e=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(e.push(s.value),!r||e.length!==r);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.exports=function(o){var s=this,u={};return Array.isArray(this.items)?this.items.forEach(function(t){var r=o(t),e=c(r,2),n=e[0],i=e[1];u[n]=i}):Object.keys(this.items).forEach(function(t){var r=o(s.items[t]),e=c(r,2),n=e[0],i=e[1];u[n]=i}),new this.constructor(u)}},function(t,r,e){"use strict";function n(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}t.exports=function(t){return"string"==typeof t?Math.max.apply(Math,n(this.pluck(t).all())):Math.max.apply(Math,n(this.items))}},function(t,r,e){"use strict";t.exports=function(t){var r=this.items.length;return void 0===t?r%2==0?(this.items[r/2-1]+this.items[r/2])/2:this.items[Math.floor(r/2)]:r%2==0?(this.items[r/2-1][t]+this.items[r/2][t])/2:this.items[Math.floor(r/2)][t]}},function(t,r,e){"use strict";t.exports=function(t){var r=t;if("string"==typeof r&&(r=[r]),Array.isArray(this.items)&&Array.isArray(r))return new this.constructor(this.items.concat(r));var e=JSON.parse(JSON.stringify(this.items));return Object.keys(r).forEach(function(t){e[t]=r[t]}),new this.constructor(e)}},function(t,r,e){"use strict";function n(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}t.exports=function(t){return void 0!==t?Math.min.apply(Math,n(this.pluck(t).all())):Math.min.apply(Math,n(this.items))}},function(t,r,e){"use strict";t.exports=function(n){var i=[],o=1;return this.items.length?(this.items.forEach(function(r){var t=i.filter(function(t){return void 0!==n?t.key===r[n]:t.key===r});if(t.length){t[0].count+=1;var e=t[0].count;o<e&&(o=e)}else void 0!==n?i.push({key:r[n],count:1}):i.push({key:r,count:1})}),i.filter(function(t){return t.count===o}).map(function(t){return t.key})):null}},function(t,r,e){"use strict";var n=e(0);t.exports=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=n(this.items).slice(t).filter(function(t,r){return r%e==0});return new this.constructor(r)}},function(t,r,e){"use strict";var u=e(2);t.exports=function(){for(var r=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=u(e);if(Array.isArray(this.items)){var o=this.items.filter(function(t){return-1!==i.indexOf(t)});return new this.constructor(o)}var s={};return Object.keys(this.items).forEach(function(t){-1!==i.indexOf(t)&&(s[t]=r.items[t])}),new this.constructor(s)}},function(t,r,e){"use strict";var f=e(58);t.exports=function(t,r){var e=Math.abs(t),n=this.count();if(e<=n)return this;for(var i=e-n,o=f(this.items),s=Array.isArray(this.items),u=t<0,c=0;c<i;)s?u?o.unshift(r):o.push(r):void 0!==o[c]?i+=1:o[c]=r,c+=1;return new this.constructor(o)}},function(t,r,e){"use strict";t.exports=function(r){var t,e=void 0;Array.isArray(r)?(t=e=[]).push.apply(t,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(r)):(e={},Object.keys(r).forEach(function(t){e[t]=r[t]}));return e}},function(t,r,e){"use strict";t.exports=function(e){var n=this,i=void 0;return Array.isArray(this.items)?(i=[new this.constructor([]),new this.constructor([])],this.items.forEach(function(t){!0===e(t)?i[0].push(t):i[1].push(t)})):(i=[new this.constructor({}),new this.constructor({})],Object.keys(this.items).forEach(function(t){var r=n.items[t];!0===e(r)?i[0].put(t,r):i[1].put(t,r)})),new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(t){return t(this)}},function(t,r,e){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=e(1);t.exports=function(r,e){if(-1!==r.indexOf("*")){var n=(t=this.items,h={},t.forEach(function(t,r){!function r(e,n){"object"===(void 0===e?"undefined":y(e))&&Object.keys(e).forEach(function(t){r(e[t],n+"."+t)}),h[n]=e}(t,r)}),h),i=[];if(void 0!==e){var o=new RegExp("0."+e,"g"),s=("0."+e).split(".").length;Object.keys(n).forEach(function(t){var r=t.match(o);if(r){var e=r[0];e.split(".").length===s&&i.push(n[e])}})}var u=[],c=new RegExp("0."+r,"g"),f=("0."+r).split(".").length;if(Object.keys(n).forEach(function(t){var r=t.match(c);if(r){var e=r[0];e.split(".").length===f&&u.push(n[e])}}),void 0===e)return new this.constructor([u]);var a={};return this.items.forEach(function(t,r){a[i[r]||""]=u}),new this.constructor(a)}var t,h;if(void 0===e)return this.map(function(t){return void 0!==l(t,r)?l(t,r):null});var p={};return this.items.forEach(function(t){void 0!==l(t,r)?p[t[e]||""]=l(t,r):p[t[e]||""]=null}),new this.constructor(p)}},function(t,r,e){"use strict";t.exports=function(){if(Array.isArray(this.items))return this.items.pop();var t=Object.keys(this.items),r=t[t.length-1],e=this.items[r];return delete this.items[r],e}},function(t,r,e){"use strict";t.exports=function(t,r){return void 0!==r?this.put(r,t):(this.items.unshift(t),this)}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.items[t]||null;return e||void 0===r||(e="function"==typeof r?r():r),delete this.items[t],e}},function(t,r,e){"use strict";t.exports=function(){var t;return(t=this.items).push.apply(t,arguments),this}},function(t,r,e){"use strict";t.exports=function(t,r){return this.items[t]=r,this}},function(t,r,e){"use strict";var n=e(0);t.exports=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,r=n(this.items),e=new this.constructor(r).shuffle();return 1===t?e.first():e.take(t)}},function(t,r,e){"use strict";t.exports=function(r,t){var e=this,n=null;return void 0!==t&&(n=t),Array.isArray(this.items)?this.items.forEach(function(t){n=r(n,t)}):Object.keys(this.items).forEach(function(t){n=r(n,e.items[t],t)}),n}},function(t,r,e){"use strict";t.exports=function(r){return new this.constructor(this.items).filter(function(t){return!r(t)})}},function(t,r,e){"use strict";t.exports=function(){var t=[].concat(this.items).reverse();return new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(e,r){var n=this,i=e;"function"==typeof e&&(i=this.items.filter(function(t,r){return e(t,r)})[0]);var t=!1;if(!Array.isArray(this.items))return Object.keys(this.items).filter(function(t){return!0===r?n.items[t]===i:n.items[t]===Number(i)||n.items[t]===i.toString()})[0]||!1;var o=this.items.filter(function(t){return!0===r?t===i:t===Number(i)||t===i.toString()})[0];return-1!==(t=this.items.indexOf(o))&&t}},function(t,r,e){"use strict";t.exports=function(){if(Array.isArray(this.items))return this.items.shift();var t=Object.keys(this.items)[0],r=this.items[t]||null;return delete this.items[t],r}},function(t,r,e){"use strict";var i=e(0);t.exports=function(){var t=i(this.items),r=void 0,e=void 0,n=void 0;for(n=t.length;n;n-=1)r=Math.floor(Math.random()*n),e=t[n-1],t[n-1]=t[r],t[r]=e;return this.items=t,this}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.items.slice(t);return void 0!==r&&(e=e.slice(0,r)),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t){var r=[].concat(this.items);return void 0===t?this.every(function(t){return"number"==typeof t})?r.sort(function(t,r){return t-r}):r.sort():r.sort(t),new this.constructor(r)}},function(t,r,e){"use strict";t.exports=function(e){var t=[].concat(this.items);return"function"==typeof e?t.sort(function(t,r){return e(t)<e(r)?-1:e(t)>e(r)?1:0}):t.sort(function(t,r){return t[e]<r[e]?-1:t[e]>r[e]?1:0}),new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(t){return this.sortBy(t).reverse()}},function(t,r,e){"use strict";t.exports=function(t,r,e){var n=this.slice(t,r);if(this.items=this.diff(n.all()).all(),Array.isArray(e))for(var i=0,o=e.length;i<o;i+=1)this.items.splice(t+i,0,e[i]);return n}},function(t,r,e){"use strict";t.exports=function(t){for(var r=Math.round(this.items.length/t),e=JSON.parse(JSON.stringify(this.items)),n=[],i=0;i<t;i+=1)n.push(new this.constructor(e.splice(0,r)));return new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){var r=0;if(void 0===t)for(var e=0,n=this.items.length;e<n;e+=1)r+=this.items[e];else if("function"==typeof t)for(var i=0,o=this.items.length;i<o;i+=1)r+=t(this.items[i]);else for(var s=0,u=this.items.length;s<u;s+=1)r+=this.items[s][t];return r}},function(t,r,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var r=this;if(Array.isArray(this.items)||"object"!==o(this.items))return t<0?new this.constructor(this.items.slice(t)):new this.constructor(this.items.slice(0,t));var e=Object.keys(this.items),n=void 0;n=t<0?e.slice(t):e.slice(0,t);var i={};return e.forEach(function(t){-1!==n.indexOf(t)&&(i[t]=r.items[t])}),new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(t){return t(this),this}},function(t,r,e){"use strict";t.exports=function(t,r){for(var e=1;e<=t;e+=1)this.items.push(r(e));return this}},function(t,r,e){"use strict";t.exports=function(){var i=this.constructor;if(Array.isArray(this.items)){var r=[];return this.items.forEach(function(t){!function r(t,e){var n=[];t instanceof i?(t.items.forEach(function(t){return r(t,n)}),e.push(n)):Array.isArray(t)?(t.forEach(function(t){return r(t,n)}),e.push(n)):e.push(t)}(t,r)}),r}return this.values().all()}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(){return"object"!==n(this.items)||Array.isArray(this.items)?JSON.stringify(this.toArray()):JSON.stringify(this.all())}},function(t,r,e){"use strict";t.exports=function(r){var e=this;if(Array.isArray(this.items))this.items=this.items.map(r);else{var n={};Object.keys(this.items).forEach(function(t){n[t]=r(e.items[t],t)}),this.items=n}return this}},function(t,r,e){"use strict";t.exports=function(t,r,e){t?e(this):r(this)}},function(t,r,e){"use strict";t.exports=function(r){var e=this,n=JSON.parse(JSON.stringify(this.items));return Object.keys(r).forEach(function(t){void 0===e.items[t]&&(n[t]=r[t])}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){var r=void 0;if(void 0===t)r=this.items.filter(function(t,r,e){return e.indexOf(t)===r});else{r=[];for(var e=[],n=0,i=this.items.length;n<i;n+=1){var o=void 0;o="function"==typeof t?t(this.items[n]):this.items[n][t],-1===e.indexOf(o)&&(r.push(this.items[n]),e.push(o))}}return new this.constructor(r)}},function(t,r,e){"use strict";t.exports=function(t){return t instanceof this.constructor?t.all():t}},function(t,r,e){"use strict";t.exports=function(){var r=this,e=[];return Object.keys(this.items).forEach(function(t){e.push(r.items[t])}),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t,r,e){return t?r(this,t):e?e(this,t):this}},function(t,r,e){"use strict";var s=e(0),u=e(1);t.exports=function(r,t,e){var n=t,i=e;void 0===e&&(i=t,n="===");var o=s(this.items).filter(function(t){switch(n){case"==":return u(t,r)===Number(i)||u(t,r)===i.toString();default:case"===":return u(t,r)===i;case"!=":case"<>":return u(t,r)!==Number(i)&&u(t,r)!==i.toString();case"!==":return u(t,r)!==i;case"<":return u(t,r)<i;case"<=":return u(t,r)<=i;case">":return u(t,r)>i;case">=":return u(t,r)>=i}});return new this.constructor(o)}},function(t,r,e){"use strict";var i=e(0),o=e(1);t.exports=function(r,t){var e=i(t),n=this.items.filter(function(t){return-1!==e.indexOf(o(t,r))});return new this.constructor(n)}},function(t,r,e){"use strict";var i=e(0),o=e(1);t.exports=function(r,t){var e=i(t),n=this.items.filter(function(t){return-1===e.indexOf(o(t,r))});return new this.constructor(n)}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return t instanceof this.constructor?t:"object"===(void 0===t?"undefined":n(t))?new this.constructor(t):new this.constructor([t])}},function(t,r,e){"use strict";t.exports=function(t){var e=this,n=t;n instanceof this.constructor&&(n=n.all());var r=this.items.map(function(t,r){return new e.constructor([t,n[r]])});return new this.constructor(r)}}]);

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

# 4.1.0
## Breaking changes
## Methods
#### ``flatMap()``
- Changed ``flatMap()`` according to https://github.com/ecrmnn/collect.js/issues/195
# 4.0.1

@@ -272,2 +280,2 @@ - Added build files so it's no longer required to use npm for installation

## Misc
- Added ``CHANGELOG.md``
- Added ``CHANGELOG.md``
'use strict';
module.exports = function flatMap(fn) {
var items = [];
this.items.forEach(function (childObject, index) {
var keys = Object.keys(childObject);
var values = [];
keys.forEach(function (prop) {
values.push(childObject[prop]);
});
var mapped = fn(values, index);
var collection = {};
keys.forEach(function (key, i) {
collection[key] = mapped[i];
});
items.push(collection);
});
return new this.constructor(Object.assign.apply(Object, items));
return this.map(fn).collapse();
};
{
"name": "collect.js",
"version": "4.0.30",
"version": "4.1.0",
"description": "Convenient and dependency free wrapper for working with arrays and objects.",

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

'use strict';
module.exports = function flatMap(fn) {
const items = [];
this.items.forEach((childObject, index) => {
const keys = Object.keys(childObject);
const values = [];
keys.forEach((prop) => {
values.push(childObject[prop]);
});
const mapped = fn(values, index);
const collection = {};
keys.forEach((key, i) => {
collection[key] = mapped[i];
});
items.push(collection);
});
return new this.constructor(Object.assign(...items));
return this.map(fn).collapse();
};

Sorry, the diff of this file is too big to display

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