mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Optimize _.invoke for arrays.
This commit is contained in:
17
dist/lodash.compat.js
vendored
17
dist/lodash.compat.js
vendored
@@ -3859,15 +3859,22 @@
|
||||
* // => [['1', '2', '3'], ['4', '5', '6']]
|
||||
*/
|
||||
function invoke(collection, methodName) {
|
||||
var args = slice(arguments, 2),
|
||||
index = -1,
|
||||
var index = -1,
|
||||
isFunc = typeof methodName == 'function',
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
if (arguments.length < 3 && isArray(collection)) {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
result[index] = isFunc ? methodName.call(value) : value[methodName]();
|
||||
}
|
||||
} else {
|
||||
var args = slice(arguments, 2);
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
26
dist/lodash.compat.min.js
vendored
26
dist/lodash.compat.min.js
vendored
@@ -45,19 +45,19 @@ n[u]=Ot(n[u],j,null,n)}return n},u.bindKey=function(n,t){return 3>arguments.leng
|
||||
}},u.countBy=he,u.create=function(n,t){var r=A(n);return t?tr(r,t):r},u.createCallback=cr,u.curry=function(n,t){return typeof t!="number"&&(t=+t||(n?n.length:0)),Ot(n,C,t)},u.debounce=nr,u.defaults=rr,u.defer=function(n){if(!or(n))throw new kr;var t=qt(arguments,1);return Kr(function(){n.apply(w,t)},1)},u.delay=function(n,t){if(!or(n))throw new kr;var r=qt(arguments,2);return Kr(function(){n.apply(w,r)},t)},u.difference=function(n){return gt(n,mt(arguments,true,true,1))},u.filter=Kt,u.flatten=function(n,t,r,e){var u=typeof t;
|
||||
return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(n=Xt(n,r,e)),mt(n,t)},u.forEach=Ut,u.forEachRight=Vt,u.forIn=function(n,t,r){return t=t&&typeof r=="undefined"?t:H(t,r,3),se(n,t)},u.forInRight=function(n,t,r){var e=[];se(n,function(n,t){e.push(t,n)});var u=e.length;for(t=H(t,r,3);u--&&false!==t(e[u--],e[u],n););return n},u.forOwn=function(n,t,r){return t=t&&typeof r=="undefined"?t:H(t,r,3),dt(n,t)},u.forOwnRight=function(n,t,r){var e=_e(n),u=e.length;
|
||||
for(t=H(t,r,3);u--&&(r=e[u],false!==t(n[r],r,n)););return n},u.functions=er,u.groupBy=ve,u.indexBy=ye,u.initial=function(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=o;for(t=u.createCallback(t,r,3);a--&&t(n[a],a,n);)e++}else e=null==t||r?1:t||e;return e=o-e,qt(n,0,0<e?e:0)},u.intersection=function(){for(var n=[],e=-1,u=arguments.length,o=c(),a=St(),i=ce&&a===t,l=c();++e<u;){var f=arguments[e];(de(f)||Nt(f))&&(n.push(f),o.push(i&&f.length>=S&&ce(e?n[e]:l)))}var i=n[0],p=-1,g=i?i.length:0,h=[];
|
||||
n:for(;++p<g;){var v=o[0],f=i[p];if(0>(v?r(v,f):a(l,f))){for(e=u,(v||l).push(f);--e;)if(v=o[e],0>(v?r(v,f):a(n[e],f)))continue n;h.push(f)}}return s(o),s(l),h},u.invert=function(n,t){for(var r=-1,e=_e(n),u=e.length,o={};++r<u;){var a=e[r],i=n[a];t?Br.call(o,i)?o[i].push(a):o[i]=[a]:o[i]=a}return o},u.invoke=function(n,t){var r=qt(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,a=yr(typeof o=="number"?o:0);return ht(n,function(n){a[++e]=(u?t:n[t]).apply(n,r)}),a},u.keys=_e,u.map=Xt,u.mapValues=function(n,t,r){var e={};
|
||||
return t=u.createCallback(t,r,3),dt(n,function(n,r,u){e[r]=t(n,r,u)}),e},u.match=sr,u.max=Gt,u.memoize=function(n,t){if(!or(n))throw new kr;var r=function(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Br.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return r.cache={},r},u.merge=function(n,t,r){if(!ar(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var a=H(e[--u-1],e[u--],2);else 2<u&&"function"==typeof e[u-1]&&(a=e[--u]);
|
||||
for(var e=qt(arguments,1,u),o=-1,i=c(),l=c();++o<u;)jt(n,e[o],a,i,l);return s(i),s(l),n},u.min=function(n,t,r){var o=1/0,a=o,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&de(n))for(r=-1,i=n.length;++r<i;){var l=n[r];l<a&&(a=l)}else t=null==t&&lr(n)?e:u.createCallback(t,r,3),ht(n,function(n,r,e){r=t(n,r,e),r<o&&(o=r,a=n)});return a},u.omit=function(n,t,r){var e={};if(typeof t!="function"){var o=[];se(n,function(n,t){o.push(t)});for(var o=gt(o,mt(arguments,true,false,1)),a=-1,i=o.length;++a<i;){var l=o[a];
|
||||
e[l]=n[l]}}else t=u.createCallback(t,r,3),se(n,function(n,r,u){t(n,r,u)||(e[r]=n)});return e},u.once=function(n){var t,r;if(!or(n))throw new kr;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}},u.pairs=function(n){for(var t=-1,r=_e(n),e=r.length,u=yr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},u.partial=function(n){var t=n&&(n[N]?n[N][2]:n.length),r=qt(arguments,1),t=t-r.length;return Ot(n,O,t,null,r)},u.partialRight=function(n){var t=n&&(n[N]?n[N][2]:n.length),r=qt(arguments,1),t=t-r.length;
|
||||
return Ot(n,E,t,null,null,r)},u.pick=function(n,t,r){var e={};if(typeof t!="function")for(var o=-1,a=mt(arguments,true,false,1),i=ar(n)?a.length:0;++o<i;){var l=a[o];l in n&&(e[l]=n[l])}else t=u.createCallback(t,r,3),se(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},u.pluck=me,u.property=vr,u.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,a=t[r];++o<u;)n[o]===a&&(Mr.call(n,o--,1),u--);return n},u.range=function(n,t,r){n=+n||0,r=typeof r=="number"?r:+r||1,null==t&&(t=n,n=0);
|
||||
var e=-1;t=Zr(0,Pr((t-n)/(r||1)));for(var u=yr(t);++e<t;)u[e]=n,n+=r;return u},u.reject=function(n,t,r){return t=u.createCallback(t,r,3),Kt(n,function(n,r,e){return!t(n,r,e)})},u.remove=function(n,t,r){var e=-1,o=n?n.length:0,a=[];for(t=u.createCallback(t,r,3);++e<o;)r=n[e],t(r,e,n)&&(a.push(r),Mr.call(n,e--,1),o--);return a},u.rest=Pt,u.shuffle=Qt,u.slice=qt,u.sortBy=function(n,t,r){var e=-1,o=t&&de(t),l=n?n.length:0,f=yr(typeof l=="number"?l:0);for(o||(t=u.createCallback(t,r,3)),ht(n,function(n,r,u){if(o)for(u=t.length,r=yr(u);u--;)r[u]=n[t[u]];
|
||||
else r=t(n,r,u);u=f[++e]=J.pop()||{f:null,g:0,h:null},u.f=r,u.g=e,u.h=n}),l=f.length,f.sort(o?i:a);l--;)n=f[l],f[l]=n.h,g(n);return f},u.tap=function(n,t,r){return t.call(r,n),n},u.throttle=function(n,t,r){var e=true,u=true;if(!or(n))throw new kr;return false===r?e=false:ar(r)&&(e="leading"in r?r.leading:e,u="trailing"in r?r.trailing:u),ct.leading=e,ct.maxWait=t,ct.trailing=u,nr(n,t,ct)},u.times=function(n,t,r){n=-1<(n=+n)?n:0;var e=-1,u=yr(n);for(t=H(t,r,1);++e<n;)u[e]=t(e);return u},u.toArray=function(n){return n&&typeof n.length=="number"?fe.unindexedChars&&lr(n)?n.split(""):qt(n):fr(n)
|
||||
},u.transform=function(n,t,r,e){var o=de(n);if(null==r)if(o)r=[];else{var a=n&&n.constructor;r=A(a&&a.prototype)}return t&&(t=u.createCallback(t,e,4),(o?ht:dt)(n,function(n,e,u){return t(r,n,e,u)})),r},u.union=function(){return Ct(mt(arguments,true,true))},u.uniq=$t,u.values=fr,u.where=Kt,u.without=function(n){return gt(n,qt(arguments,1))},u.wrap=function(n,t){return Ot(t,O,null,null,[n])},u.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(de(r)||Nt(r))var e=e?gt(e,r).concat(gt(r,e)):r
|
||||
}return e?Ct(e):[]},u.zip=Lt,u.zipObject=Bt,u.callback=cr,u.collect=Xt,u.drop=Pt,u.each=Ut,u.eachRight=Vt,u.extend=tr,u.methods=er,u.object=Bt,u.select=Kt,u.tail=Pt,u.unique=$t,u.unzip=Lt,gr(tr({},u)),u.capitalize=function(n){return null==n?"":(n=Cr(n),n.charAt(0).toUpperCase()+n.slice(1))},u.clone=function(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),d(n,t,typeof r=="function"&&H(r,e,1))},u.cloneDeep=function(n,t,r){return d(n,true,typeof t=="function"&&H(t,r,1))
|
||||
},u.contains=Wt,u.escape=function(n){return null==n?"":Cr(n).replace($,l)},u.every=zt,u.find=Mt,u.findIndex=function(n,t,r){var e=-1,o=n?n.length:0;for(t=u.createCallback(t,r,3);++e<o;)if(t(n[e],e,n))return e;return-1},u.findKey=function(n,t,r){var e;return t=u.createCallback(t,r,3),dt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},u.findLast=function(n,t,r){var e;return t=u.createCallback(t,r,3),vt(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e},u.findLastIndex=function(n,t,r){var e=n?n.length:0;
|
||||
for(t=u.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},u.findLastKey=function(n,t,r){var e;return t=u.createCallback(t,r,3),_t(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},u.has=function(n,t){return n?Br.call(n,t):false},u.identity=pr,u.indexOf=Tt,u.isArguments=Nt,u.isArray=de,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Rr.call(n)==tt||false},u.isDate=function(n){return n&&typeof n=="object"&&Rr.call(n)==rt||false},u.isElement=ur,u.isEmpty=function(n){var t=true;
|
||||
if(!n)return t;var r=Rr.call(n),e=n.length;return r==nt||r==lt||(fe.argsClass?r==Z:Nt(n))||r==at&&typeof e=="number"&&or(n.splice)?!e:(dt(n,function(){return t=false}),t)},u.isEqual=function(n,t,r,e){return wt(n,t,typeof r=="function"&&H(r,e,2))},u.isFinite=function(n){return Jr(n)&&!Qr(parseFloat(n))},u.isFunction=or,u.isNaN=function(n){return ir(n)&&n!=+n},u.isNull=function(n){return null===n},u.isNumber=ir,u.isObject=ar,u.isPlainObject=be,u.isRegExp=function(n){var t=typeof n;return n&&("function"==t||"object"==t)&&Rr.call(n)==it||false
|
||||
},u.isString=lr,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Zr(0,e+r):ne(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=gr,u.noConflict=function(){return n._=Nr,this},u.noop=hr,u.now=Ce,u.parseInt=ke,u.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=ee(),ne(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):xt(n,t)
|
||||
n:for(;++p<g;){var v=o[0],f=i[p];if(0>(v?r(v,f):a(l,f))){for(e=u,(v||l).push(f);--e;)if(v=o[e],0>(v?r(v,f):a(n[e],f)))continue n;h.push(f)}}return s(o),s(l),h},u.invert=function(n,t){for(var r=-1,e=_e(n),u=e.length,o={};++r<u;){var a=e[r],i=n[a];t?Br.call(o,i)?o[i].push(a):o[i]=[a]:o[i]=a}return o},u.invoke=function(n,t){var r=-1,e=typeof t=="function",u=n?n.length:0,o=yr(typeof u=="number"?u:0);if(3>arguments.length&&de(n))for(;++r<u;){var a=n[r];o[r]=e?t.call(a):a[t]()}else{var i=qt(arguments,2);
|
||||
ht(n,function(n){o[++r]=(e?t:n[t]).apply(n,i)})}return o},u.keys=_e,u.map=Xt,u.mapValues=function(n,t,r){var e={};return t=u.createCallback(t,r,3),dt(n,function(n,r,u){e[r]=t(n,r,u)}),e},u.match=sr,u.max=Gt,u.memoize=function(n,t){if(!or(n))throw new kr;var r=function(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Br.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return r.cache={},r},u.merge=function(n,t,r){if(!ar(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var a=H(e[--u-1],e[u--],2);
|
||||
else 2<u&&"function"==typeof e[u-1]&&(a=e[--u]);for(var e=qt(arguments,1,u),o=-1,i=c(),l=c();++o<u;)jt(n,e[o],a,i,l);return s(i),s(l),n},u.min=function(n,t,r){var o=1/0,a=o,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&de(n))for(r=-1,i=n.length;++r<i;){var l=n[r];l<a&&(a=l)}else t=null==t&&lr(n)?e:u.createCallback(t,r,3),ht(n,function(n,r,e){r=t(n,r,e),r<o&&(o=r,a=n)});return a},u.omit=function(n,t,r){var e={};if(typeof t!="function"){var o=[];se(n,function(n,t){o.push(t)
|
||||
});for(var o=gt(o,mt(arguments,true,false,1)),a=-1,i=o.length;++a<i;){var l=o[a];e[l]=n[l]}}else t=u.createCallback(t,r,3),se(n,function(n,r,u){t(n,r,u)||(e[r]=n)});return e},u.once=function(n){var t,r;if(!or(n))throw new kr;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}},u.pairs=function(n){for(var t=-1,r=_e(n),e=r.length,u=yr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},u.partial=function(n){var t=n&&(n[N]?n[N][2]:n.length),r=qt(arguments,1),t=t-r.length;return Ot(n,O,t,null,r)
|
||||
},u.partialRight=function(n){var t=n&&(n[N]?n[N][2]:n.length),r=qt(arguments,1),t=t-r.length;return Ot(n,E,t,null,null,r)},u.pick=function(n,t,r){var e={};if(typeof t!="function")for(var o=-1,a=mt(arguments,true,false,1),i=ar(n)?a.length:0;++o<i;){var l=a[o];l in n&&(e[l]=n[l])}else t=u.createCallback(t,r,3),se(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},u.pluck=me,u.property=vr,u.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,a=t[r];++o<u;)n[o]===a&&(Mr.call(n,o--,1),u--);
|
||||
return n},u.range=function(n,t,r){n=+n||0,r=typeof r=="number"?r:+r||1,null==t&&(t=n,n=0);var e=-1;t=Zr(0,Pr((t-n)/(r||1)));for(var u=yr(t);++e<t;)u[e]=n,n+=r;return u},u.reject=function(n,t,r){return t=u.createCallback(t,r,3),Kt(n,function(n,r,e){return!t(n,r,e)})},u.remove=function(n,t,r){var e=-1,o=n?n.length:0,a=[];for(t=u.createCallback(t,r,3);++e<o;)r=n[e],t(r,e,n)&&(a.push(r),Mr.call(n,e--,1),o--);return a},u.rest=Pt,u.shuffle=Qt,u.slice=qt,u.sortBy=function(n,t,r){var e=-1,o=t&&de(t),l=n?n.length:0,f=yr(typeof l=="number"?l:0);
|
||||
for(o||(t=u.createCallback(t,r,3)),ht(n,function(n,r,u){if(o)for(u=t.length,r=yr(u);u--;)r[u]=n[t[u]];else r=t(n,r,u);u=f[++e]=J.pop()||{f:null,g:0,h:null},u.f=r,u.g=e,u.h=n}),l=f.length,f.sort(o?i:a);l--;)n=f[l],f[l]=n.h,g(n);return f},u.tap=function(n,t,r){return t.call(r,n),n},u.throttle=function(n,t,r){var e=true,u=true;if(!or(n))throw new kr;return false===r?e=false:ar(r)&&(e="leading"in r?r.leading:e,u="trailing"in r?r.trailing:u),ct.leading=e,ct.maxWait=t,ct.trailing=u,nr(n,t,ct)},u.times=function(n,t,r){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=yr(n);for(t=H(t,r,1);++e<n;)u[e]=t(e);return u},u.toArray=function(n){return n&&typeof n.length=="number"?fe.unindexedChars&&lr(n)?n.split(""):qt(n):fr(n)},u.transform=function(n,t,r,e){var o=de(n);if(null==r)if(o)r=[];else{var a=n&&n.constructor;r=A(a&&a.prototype)}return t&&(t=u.createCallback(t,e,4),(o?ht:dt)(n,function(n,e,u){return t(r,n,e,u)})),r},u.union=function(){return Ct(mt(arguments,true,true))},u.uniq=$t,u.values=fr,u.where=Kt,u.without=function(n){return gt(n,qt(arguments,1))
|
||||
},u.wrap=function(n,t){return Ot(t,O,null,null,[n])},u.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(de(r)||Nt(r))var e=e?gt(e,r).concat(gt(r,e)):r}return e?Ct(e):[]},u.zip=Lt,u.zipObject=Bt,u.callback=cr,u.collect=Xt,u.drop=Pt,u.each=Ut,u.eachRight=Vt,u.extend=tr,u.methods=er,u.object=Bt,u.select=Kt,u.tail=Pt,u.unique=$t,u.unzip=Lt,gr(tr({},u)),u.capitalize=function(n){return null==n?"":(n=Cr(n),n.charAt(0).toUpperCase()+n.slice(1))},u.clone=function(n,t,r,e){var u=typeof t;
|
||||
return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),d(n,t,typeof r=="function"&&H(r,e,1))},u.cloneDeep=function(n,t,r){return d(n,true,typeof t=="function"&&H(t,r,1))},u.contains=Wt,u.escape=function(n){return null==n?"":Cr(n).replace($,l)},u.every=zt,u.find=Mt,u.findIndex=function(n,t,r){var e=-1,o=n?n.length:0;for(t=u.createCallback(t,r,3);++e<o;)if(t(n[e],e,n))return e;return-1},u.findKey=function(n,t,r){var e;return t=u.createCallback(t,r,3),dt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0
|
||||
}),e},u.findLast=function(n,t,r){var e;return t=u.createCallback(t,r,3),vt(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e},u.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=u.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},u.findLastKey=function(n,t,r){var e;return t=u.createCallback(t,r,3),_t(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},u.has=function(n,t){return n?Br.call(n,t):false},u.identity=pr,u.indexOf=Tt,u.isArguments=Nt,u.isArray=de,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Rr.call(n)==tt||false
|
||||
},u.isDate=function(n){return n&&typeof n=="object"&&Rr.call(n)==rt||false},u.isElement=ur,u.isEmpty=function(n){var t=true;if(!n)return t;var r=Rr.call(n),e=n.length;return r==nt||r==lt||(fe.argsClass?r==Z:Nt(n))||r==at&&typeof e=="number"&&or(n.splice)?!e:(dt(n,function(){return t=false}),t)},u.isEqual=function(n,t,r,e){return wt(n,t,typeof r=="function"&&H(r,e,2))},u.isFinite=function(n){return Jr(n)&&!Qr(parseFloat(n))},u.isFunction=or,u.isNaN=function(n){return ir(n)&&n!=+n},u.isNull=function(n){return null===n
|
||||
},u.isNumber=ir,u.isObject=ar,u.isPlainObject=be,u.isRegExp=function(n){var t=typeof n;return n&&("function"==t||"object"==t)&&Rr.call(n)==it||false},u.isString=lr,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Zr(0,e+r):ne(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=gr,u.noConflict=function(){return n._=Nr,this},u.noop=hr,u.now=Ce,u.parseInt=ke,u.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=ee(),ne(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):xt(n,t)
|
||||
},u.reduce=Ht,u.reduceRight=Jt,u.result=function(n,t,r){return null==n?r:(r="undefined"!=typeof n[t]?n[t]:r,or(r)?n[t]():r)},u.runInContext=_,u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:_e(n).length},u.some=Yt,u.sortedIndex=Ft,u.template=function(n,t,r){var e=u.templateSettings;n=Cr(n||""),r=rr({},r,e);var o,a=rr({},r.imports,e.imports),e=_e(a),a=fr(a),i=0,l=r.interpolate||U,c="__p+='",l=xr((r.escape||U).source+"|"+l.source+"|"+(l===D?W:U).source+"|"+(r.evaluate||U).source+"|$","g");
|
||||
n.replace(l,function(t,r,e,u,a,l){return e||(e=u),c+=n.slice(i,l).replace(X,f),r&&(c+="'+__e("+r+")+'"),a&&(o=true,c+="';"+a+";\n__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),i=l+t.length,t}),c+="';",l=r=r.variable,l||(r="obj",c="with("+r+"){"+c+"}"),c=(o?c.replace(T,""):c).replace(P,"$1").replace(q,"$1;"),c="function("+r+"){"+(l?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var p=br(e,"return "+c).apply(w,a)
|
||||
}catch(s){throw s.source=c,s}return t?p(t):(p.source=c,p)},u.trim=we,u.trimLeft=je,u.trimRight=xe,u.unescape=function(n){return null==n?"":(n=Cr(n),0>n.indexOf(";")?n:n.replace(F,b))},u.uniqueId=function(n){var t=++R;return Cr(null==n?"":n)+t},u.all=zt,u.any=Yt,u.detect=Mt,u.findWhere=Mt,u.foldl=Ht,u.foldr=Jt,u.include=Wt,u.inject=Ht,gr(function(){var n={};return dt(u,function(t,r){u.prototype[r]||(n[r]=t)}),n}(),false),u.first=Rt,u.last=function(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=o;
|
||||
|
||||
17
dist/lodash.js
vendored
17
dist/lodash.js
vendored
@@ -3596,15 +3596,22 @@
|
||||
* // => [['1', '2', '3'], ['4', '5', '6']]
|
||||
*/
|
||||
function invoke(collection, methodName) {
|
||||
var args = slice(arguments, 2),
|
||||
index = -1,
|
||||
var index = -1,
|
||||
isFunc = typeof methodName == 'function',
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
if (arguments.length < 3 && typeof length == 'number') {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
result[index] = isFunc ? methodName.call(value) : value[methodName]();
|
||||
}
|
||||
} else {
|
||||
var args = slice(arguments, 2);
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
61
dist/lodash.min.js
vendored
61
dist/lodash.min.js
vendored
@@ -9,15 +9,15 @@
|
||||
*/
|
||||
(function(){function n(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return 0}function t(n,t,r){r=(r||0)-1;for(var e=n?n.length:0;++r<e;)if(n[r]===t)return r;return-1}function r(n,t){return n.has(t)?0:-1}function e(n){return n.charCodeAt(0)}function u(n,t){for(var r=-1,e=n.length;++r<e&&0<=t.indexOf(n.charAt(r)););return r}function o(n,t){for(var r=n.length;r--&&0<=t.indexOf(n.charAt(r)););return r}function i(t,r){return n(t.f,r.f)||t.g-r.g}function a(t,r){for(var e=t.f,u=r.f,o=-1,i=e.length;++o<i;){var a=n(e[o],u[o]);
|
||||
if(a)return a}return t.g-r.g}function f(n){return lt[n]}function l(n){return"\\"+st[n]}function c(){return G.pop()||[]}function p(n){n.length=0,G.length<S&&G.push(n)}function s(n){n.f=n.h=null,H.length<S&&H.push(n)}function g(n,t){return(n=null==n?"":n+"")?null==t?n.slice(y(n),m(n)+1):(t+="",n.slice(u(n,t),o(n,t)+1)):n}function h(n,t){return(n=null==n?"":n+"")?null==t?n.slice(y(n)):(t+="",n.slice(u(n,t))):n}function v(n,t){return(n=null==n?"":n+"")?null==t?n.slice(0,m(n)+1):(t+="",n.slice(0,o(n,t)+1)):n
|
||||
}function y(n){for(var t=-1,r=n.length;++t<r;){var e=n.charCodeAt(t);if((160<e||9>e||13<e)&&32!=e&&160!=e&&5760!=e&&6158!=e&&(8192>e||8202<e&&8232!=e&&8233!=e&&8239!=e&&8287!=e&&12288!=e&&65279!=e))break}return t}function m(n){for(var t=n.length;t--;){var r=n.charCodeAt(t);if((160<r||9>r||13<r)&&32!=r&&160!=r&&5760!=r&&6158!=r&&(8192>r||8202<r&&8232!=r&&8233!=r&&8239!=r&&8287!=r&&12288!=r&&65279!=r))break}return t}function d(n){return ct[n]}function b(n){function u(n){var t=[];if(!ur(n))return t;
|
||||
}function y(n){for(var t=-1,r=n.length;++t<r;){var e=n.charCodeAt(t);if((160<e||9>e||13<e)&&32!=e&&160!=e&&5760!=e&&6158!=e&&(8192>e||8202<e&&8232!=e&&8233!=e&&8239!=e&&8287!=e&&12288!=e&&65279!=e))break}return t}function m(n){for(var t=n.length;t--;){var r=n.charCodeAt(t);if((160<r||9>r||13<r)&&32!=r&&160!=r&&5760!=r&&6158!=r&&(8192>r||8202<r&&8232!=r&&8233!=r&&8239!=r&&8287!=r&&12288!=r&&65279!=r))break}return t}function b(n){return ct[n]}function d(n){function u(n){var t=[];if(!ur(n))return t;
|
||||
for(var r in n)Br.call(n,r)&&t.push(r);return t}function o(n,t){if(!ur(n))return n;for(var r in n)if(false===t(n[r],r,n))break;return n}function y(n){return n&&typeof n=="object"&&!se(n)&&Br.call(n,"__wrapped__")?n:new m(n)}function m(n,t){this.__chain__=!!t,this.__wrapped__=n}function S(n){function t(){if(u){var n=Tt(u);Dr.apply(n,arguments)}if(this instanceof t){var o=lt(r.prototype),n=r.apply(o,n||arguments);return ur(n)?n:o}return r.apply(e,n||arguments)}var r=n[0],e=n[3],u=n[4];return ae(t,n),t
|
||||
}function G(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o}if(!ur(n))return n;var i=Er.call(n);if(!it[i])return n;var a=ee[i];switch(i){case Z:case nt:return new a(+n);case rt:case ot:return new a(n);case ut:return o=a(n.source,L.exec(n)),o.lastIndex=n.lastIndex,o}if(i=se(n),t){var f=!e;e||(e=c()),u||(u=c());for(var l=e.length;l--;)if(e[l]==n)return u[l];o=i?a(n.length):{}}else o=i?Tt(n):Zt({},n);return i&&(Br.call(n,"index")&&(o.index=n.index),Br.call(n,"input")&&(o.input=n.input)),t?(e.push(n),u.push(o),(i?ht:dt)(n,function(n,i){o[i]=G(n,t,r,e,u)
|
||||
}function G(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o}if(!ur(n))return n;var i=Er.call(n);if(!it[i])return n;var a=ee[i];switch(i){case Z:case nt:return new a(+n);case rt:case ot:return new a(n);case ut:return o=a(n.source,L.exec(n)),o.lastIndex=n.lastIndex,o}if(i=se(n),t){var f=!e;e||(e=c()),u||(u=c());for(var l=e.length;l--;)if(e[l]==n)return u[l];o=i?a(n.length):{}}else o=i?Tt(n):Zt({},n);return i&&(Br.call(n,"index")&&(o.index=n.index),Br.call(n,"input")&&(o.input=n.input)),t?(e.push(n),u.push(o),(i?ht:bt)(n,function(n,i){o[i]=G(n,t,r,e,u)
|
||||
}),f&&(p(e),p(u)),o):o}function lt(n){return ur(n)?Mr(n):{}}function ct(n,t,r){if(typeof n!="function")return lr;if(typeof t=="undefined"||!("prototype"in n))return n;var e=n[N];if(typeof e=="undefined"&&(ue.funcNames&&(e=!n.name),e=e||!ue.funcDecomp,!e)){var u=Fr.call(n);ue.funcNames||(e=!P.test(u)),e||(e=U.test(u),ae(n,e))}if(false===e||true!==e&&e[1]&w)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)
|
||||
};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)}}return Qt(n,t)}function pt(n){function t(){var n=f?o:this;if(i){var g=Tt(i);Dr.apply(g,arguments)}if(a||c){g||(g=Tt(arguments)),a&&Dr.apply(g,a);var h=arguments.length;if(c&&h<u)return e|=C,e&=~O,p||(e&=~(w|k)),n=Hr(0,u-h),pt([r,e,n,o,g])}return g||(g=arguments),l&&(r=n[s]),this instanceof t?(n=lt(r.prototype),g=r.apply(n,g),ur(g)?g:n):r.apply(n,g)}var r=n[0],e=n[1],u=n[2],o=n[3],i=n[4],a=n[5],f=e&w,l=e&k,c=e&j,p=e&x,s=r;return ae(t,n),t
|
||||
}function st(n,e){var u=-1,o=Ot(),i=n?n.length:0,a=[];for(ie&&e&&o===t&&e.length>=A&&(o=r,e=ie(e));++u<i;){var f=n[u];0>o(e,f)&&a.push(f)}return a}function ht(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(;++r<e&&false!==t(n[r],r,n););else dt(n,t);return n}function vt(n,t){var r=n?n.length:0;if(typeof r=="number")for(;r--&&false!==t(n[r],r,n););else bt(n,t)}function mt(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(se(i)||Et(i))){t||(i=mt(i,t,r));
|
||||
var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else r||o.push(i)}return o}function dt(n,t){for(var r=-1,e=he(n),u=e.length;++r<u;){var o=e[r];if(false===t(n[o],o,n))break}return n}function bt(n,t){for(var r=he(n),e=r.length;e--;){var u=r[e];if(false===t(n[u],u,n))break}}function _t(n,t,r,e,u,i){if(r){var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var f=typeof n,l=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=l&&"object"!=l))return false;
|
||||
}function st(n,e){var u=-1,o=Ot(),i=n?n.length:0,a=[];for(ie&&e&&o===t&&e.length>=A&&(o=r,e=ie(e));++u<i;){var f=n[u];0>o(e,f)&&a.push(f)}return a}function ht(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(;++r<e&&false!==t(n[r],r,n););else bt(n,t);return n}function vt(n,t){var r=n?n.length:0;if(typeof r=="number")for(;r--&&false!==t(n[r],r,n););else dt(n,t)}function mt(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(se(i)||Et(i))){t||(i=mt(i,t,r));
|
||||
var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else r||o.push(i)}return o}function bt(n,t){for(var r=-1,e=he(n),u=e.length;++r<u;){var o=e[r];if(false===t(n[o],o,n))break}return n}function dt(n,t){for(var r=he(n),e=r.length;e--;){var u=r[e];if(false===t(n[u],u,n))break}}function _t(n,t,r,e,u,i){if(r){var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var f=typeof n,l=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=l&&"object"!=l))return false;
|
||||
if(null==n||null==t)return n===t;if(l=Er.call(n),f=Er.call(t),l==Q&&(l=et),f==Q&&(f=et),l!=f)return false;switch(l){case Z:case nt:return+n==+t;case rt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case ut:case ot:return n==kr(t)}if(f=l==Y,!f){var s=Br.call(n,"__wrapped__"),g=Br.call(t,"__wrapped__");if(s||g)return _t(s?n.__wrapped__:n,g?t.__wrapped__:t,r,e,u,i);if(l!=et)return false;if(l=n.constructor,s=t.constructor,l!=s&&!(Br.call(n,"constructor")&&Br.call(t,"constructor")||er(l)&&l instanceof l&&er(s)&&s instanceof s)&&"constructor"in n&&"constructor"in t)return false
|
||||
}for(l=!u,u||(u=c()),i||(i=c()),s=u.length;s--;)if(u[s]==n)return i[s]==t;var h=0,a=true;if(u.push(n),i.push(t),f){if(s=n.length,h=t.length,(a=h==s)||e)for(;h--;)if(f=s,g=t[h],e)for(;f--&&!(a=_t(n[f],g,r,e,u,i)););else if(!(a=_t(n[h],g,r,e,u,i)))break}else o(t,function(t,o,f){return Br.call(f,o)?(h++,a=Br.call(n,o)&&_t(n[o],t,r,e,u,i)):void 0}),a&&!e&&o(n,function(n,t,r){return Br.call(r,t)?a=-1<--h:void 0});return u.pop(),i.pop(),l&&(p(u),p(i)),a}function wt(n,t,r,e,u){(se(t)?ht:dt)(t,function(t,o){var i,a,f=t,l=n[o];
|
||||
}for(l=!u,u||(u=c()),i||(i=c()),s=u.length;s--;)if(u[s]==n)return i[s]==t;var h=0,a=true;if(u.push(n),i.push(t),f){if(s=n.length,h=t.length,(a=h==s)||e)for(;h--;)if(f=s,g=t[h],e)for(;f--&&!(a=_t(n[f],g,r,e,u,i)););else if(!(a=_t(n[h],g,r,e,u,i)))break}else o(t,function(t,o,f){return Br.call(f,o)?(h++,a=Br.call(n,o)&&_t(n[o],t,r,e,u,i)):void 0}),a&&!e&&o(n,function(n,t,r){return Br.call(r,t)?a=-1<--h:void 0});return u.pop(),i.pop(),l&&(p(u),p(i)),a}function wt(n,t,r,e,u){(se(t)?ht:bt)(t,function(t,o){var i,a,f=t,l=n[o];
|
||||
if(t&&((a=se(t))||ge(t))){for(f=e.length;f--;)if(i=e[f]==t){l=u[f];break}if(!i){var c;r&&(f=r(l,t),c=typeof f!="undefined")&&(l=f),c||(l=a?se(l)?l:[]:ge(l)?l:{}),e.push(t),u.push(l),c||wt(l,t,r,e,u)}}else r&&(f=r(l,t),typeof f=="undefined"&&(f=t)),typeof f!="undefined"&&(l=f);n[o]=l})}function kt(n,t){return n+Tr(Zr()*(t-n+1))}function jt(n,e,u){var o=-1,i=Ot(),a=n?n.length:0,f=ie&&!e&&i===t&&a>=A,l=[];if(f)var s=ie(),i=r;else s=u?c():l;for(;++o<a;){var g=n[o],h=u?u(g,o,n):g;(e?!o||s[s.length-1]!==h:0>i(s,h))&&((u||f)&&s.push(h),l.push(g))
|
||||
}return!f&&u&&p(s),l}function xt(n){return function(t,r,e){var u={};r=y.createCallback(r,e,3),e=-1;var o=t?t.length:0;if(typeof o=="number")for(;++e<o;){var i=t[e];n(u,i,r(i,e,t),t)}else ht(t,function(t,e,o){n(u,t,r(t,e,o),o)});return u}}function Ct(n,t,r,e,u,o){var i=t&w,a=t&k,f=t&C,l=t&O;if(!a&&!er(n))throw new jr;f&&!u.length&&(t&=~C,f=u=false),l&&!o.length&&(t&=~O,l=o=false);var c=!a&&n[N];return c&&true!==c?(c=Tt(c),c[4]&&(c[4]=Tt(c[4])),c[5]&&(c[5]=Tt(c[5])),typeof r=="number"&&(c[2]=r),n=c[1]&w,i&&!n&&(c[3]=e),!i&&n&&(t|=x),f&&(c[4]?Dr.apply(c[4],u):c[4]=u),l&&(c[5]?Lr.apply(c[5],o):c[5]=o),c[1]|=t,Ct.apply(null,c)):(null==r?r=a?0:n.length:0>r&&(r=0),e=[n,t,r,e,u,o],t==w||t==(w|C)?S(e):pt(e))
|
||||
}function Ot(){var n=(n=y.indexOf)===Rt?t:n;return n}function At(n){return typeof n=="function"&&Nr.test(Fr.call(n))}function St(n){var t,r;return n&&Er.call(n)==et&&(Br.call(n,"constructor")||(t=n.constructor,!er(t)||t instanceof t))?(o(n,function(n,t){r=t}),typeof r=="undefined"||Br.call(n,r)):false}function Et(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Er.call(n)==Q||false}function Nt(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=y.createCallback(t,r,3);++o<u&&t(n[o],o,n);)e++
|
||||
@@ -27,37 +27,38 @@ t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function qt(){return this.__wrapped__}fun
|
||||
});return e}function Lt(n,t,r){var e=[];t=y.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}else ht(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function Pt(n,t,r){t=y.createCallback(t,r,3),r=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return ht(n,function(n,r,e){return t(n,r,e)?(u=n,false):void 0}),u}for(;++r<e;){var o=n[r];if(t(o,r,n))return o}}function Kt(n,t,r){var e=-1,u=n?n.length:0;if(t=t&&typeof r=="undefined"?t:ct(t,r,3),typeof u=="number")for(;++e<u&&false!==t(n[e],e,n););else ht(n,t);
|
||||
return n}function Mt(n,t,r){var e=n?n.length:0;if(t=t&&typeof r=="undefined"?t:ct(t,r,3),typeof e=="number")for(;e--&&false!==t(n[e],e,n););else vt(n,t);return n}function Ut(n,t,r){var e=-1,u=n?n.length:0;if(t=y.createCallback(t,r,3),typeof u=="number")for(var o=hr(u);++e<u;)o[e]=t(n[e],e,n);else o=[],ht(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function Vt(n,t,r){var u=-1/0,o=u,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&se(n))for(r=-1,i=n.length;++r<i;){var a=n[r];a>o&&(o=a)
|
||||
}else t=null==t&&ir(n)?e:y.createCallback(t,r,3),ht(n,function(n,r,e){r=t(n,r,e),r>u&&(u=r,o=n)});return o}function Xt(n,t,r,e){var u=3>arguments.length;t=y.createCallback(t,e,4);var o=-1,i=n?n.length:0;if(typeof i=="number")for(u&&i&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n);else ht(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)});return r}function Gt(n,t,r,e){var u=3>arguments.length;return t=y.createCallback(t,e,4),vt(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function Ht(n){var t=-1,r=n?n.length:0,e=hr(typeof r=="number"?r:0);
|
||||
return ht(n,function(n){var r=kt(0,++t);e[t]=e[r],e[r]=n}),e}function Jt(n,t,r){var e;t=y.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&!(e=t(n[r],r,n)););else ht(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function Qt(n,t){if(3>arguments.length)return Ct(n,w,null,t);var r=n&&(n[N]?n[N][2]:n.length),e=Tt(arguments,2),r=r-e.length;return Ct(n,w|C,r,t,e)}function Yt(n,t,r){function e(){c&&Ir(c),i=c=p=_,(h||g!==t)&&(s=de(),a=n.apply(l,o),c||i||(o=l=null))}function u(){var r=t-(de()-f);
|
||||
0<r?c=Wr(u,r):(i&&Ir(i),r=p,i=c=p=_,r&&(s=de(),a=n.apply(l,o),c||i||(o=l=null)))}var o,i,a,f,l,c,p,s=0,g=false,h=true;if(!er(n))throw new jr;if(t=Hr(0,t)||0,true===r)var v=true,h=false;else ur(r)&&(v=r.leading,g="maxWait"in r&&(Hr(t,r.maxWait)||0),h="trailing"in r?r.trailing:h);return function(){if(o=arguments,f=de(),l=this,p=h&&(c||!v),false===g)var r=v&&!c;else{i||v||(s=f);var y=g-(f-s),m=0>=y;m?(i&&(i=Ir(i)),s=f,a=n.apply(l,o)):i||(i=Wr(e,y))}return m&&c?c=Ir(c):c||t===g||(c=Wr(u,t)),r&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a
|
||||
return ht(n,function(n){var r=kt(0,++t);e[t]=e[r],e[r]=n}),e}function Jt(n,t,r){var e;t=y.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&!(e=t(n[r],r,n)););else ht(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function Qt(n,t){if(3>arguments.length)return Ct(n,w,null,t);var r=n&&(n[N]?n[N][2]:n.length),e=Tt(arguments,2),r=r-e.length;return Ct(n,w|C,r,t,e)}function Yt(n,t,r){function e(){c&&Ir(c),i=c=p=_,(h||g!==t)&&(s=be(),a=n.apply(l,o),c||i||(o=l=null))}function u(){var r=t-(be()-f);
|
||||
0<r?c=Wr(u,r):(i&&Ir(i),r=p,i=c=p=_,r&&(s=be(),a=n.apply(l,o),c||i||(o=l=null)))}var o,i,a,f,l,c,p,s=0,g=false,h=true;if(!er(n))throw new jr;if(t=Hr(0,t)||0,true===r)var v=true,h=false;else ur(r)&&(v=r.leading,g="maxWait"in r&&(Hr(t,r.maxWait)||0),h="trailing"in r?r.trailing:h);return function(){if(o=arguments,f=be(),l=this,p=h&&(c||!v),false===g)var r=v&&!c;else{i||v||(s=f);var y=g-(f-s),m=0>=y;m?(i&&(i=Ir(i)),s=f,a=n.apply(l,o)):i||(i=Wr(e,y))}return m&&c?c=Ir(c):c||t===g||(c=Wr(u,t)),r&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a
|
||||
}}function Zt(n,t,r){var e=arguments,u=0,o=e.length,i=typeof r;if("number"!=i&&"string"!=i||!e[3]||e[3][r]!==t||(o=2),3<o&&"function"==typeof e[o-2])var a=ct(e[--o-1],e[o--],2);else 2<o&&"function"==typeof e[o-1]&&(a=e[--o]);for(;++u<o;)if(t=e[u],ur(t))for(var i=-1,f=he(t),l=f.length;++i<l;){var c=f[i];n[c]=a?a(n[c],t[c]):t[c]}return n}function nr(n,t,r){var e=arguments,u=0,o=e.length,i=typeof r;for("number"!=i&&"string"!=i||!e[3]||e[3][r]!==t||(o=2);++u<o;)if(t=e[u],ur(t))for(var i=-1,a=he(t),f=a.length;++i<f;){var l=a[i];
|
||||
"undefined"==typeof n[l]&&(n[l]=t[l])}return n}function tr(n){var t=[];return o(n,function(n,r){er(n)&&t.push(r)}),t.sort()}function rr(n){return n&&typeof n=="object"&&1===n.nodeType&&-1<Er.call(n).indexOf("Element")||false}function er(n){return typeof n=="function"}function ur(n){var t=typeof n;return n&&("function"==t||"object"==t)||false}function or(n){var t=typeof n;return"number"==t||n&&"object"==t&&Er.call(n)==rt||false}function ir(n){return typeof n=="string"||n&&typeof n=="object"&&Er.call(n)==ot||false
|
||||
}function ar(n){for(var t=-1,r=he(n),e=r.length,u=hr(e);++t<e;)u[t]=n[r[t]];return u}function fr(n,t,r){var e=typeof n;return null==n||"function"==e?ct(n,t,r):"object"!=e?gr(n):cr(n)}function lr(n){return n}function cr(n){n||(n={});var t=he(n),r=t[0],e=n[r];return 1!=t.length||e!==e||ur(e)?function(r){for(var e=t.length,u=false;e--&&(u=t[e],u=Br.call(r,u)&&_t(r[u],n[u],null,true)););return u}:function(n){return Br.call(n,r)?(n=n[r],e===n&&(0!==e||1/e==1/n)):false}}function pr(n,t,r){var e=true,u=t&&tr(t);t&&(r||u.length)||(null==r&&(r=t),t=n,n=y,u=tr(t)),false===r?e=false:ur(r)&&"chain"in r&&(e=r.chain),r=-1;
|
||||
for(var o=er(n),i=u?u.length:0;++r<i;){var a=u[r],f=n[a]=t[a];o&&(n.prototype[a]=function(t){return function(){var r=this.__chain__,u=this.__wrapped__,o=[u];if(Dr.apply(o,arguments),o=t.apply(n,o),e||r){if(u===o&&ur(o))return this;o=new n(o),o.__chain__=r}return o}}(f))}}function sr(){}function gr(n){return function(t){return t[n]}}n=n?yt.defaults(gt.Object(),n,yt.pick(gt,J)):gt;var hr=n.Array,vr=n.Boolean,yr=n.Date,mr=n.Function,dr=n.Math,br=n.Number,_r=n.Object,wr=n.RegExp,kr=n.String,jr=n.TypeError,xr=hr.prototype,Cr=_r.prototype,Or=kr.prototype,Ar=(Ar=n.window)&&Ar.document,Sr=n._,Er=Cr.toString,Nr=wr("^"+kr(Er).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rr=dr.ceil,Ir=n.clearTimeout,Tr=dr.floor,Fr=mr.prototype.toString,$r=At($r=_r.getPrototypeOf)&&$r,Br=Cr.hasOwnProperty,Dr=xr.push,qr=At(qr=n.Set)&&qr,Wr=n.setTimeout,zr=xr.splice,Lr=xr.unshift,Pr=function(){try{var n={},t=At(t=_r.defineProperty)&&t,r=t(n,n,n)&&t
|
||||
}catch(e){}return r}(),Kr=At(Kr=Or.contains)&&Kr,Mr=At(Mr=_r.create)&&Mr,Ur=At(Ur=hr.isArray)&&Ur,Vr=n.isFinite,Xr=n.isNaN,Gr=At(Gr=_r.keys)&&Gr,Hr=dr.max,Jr=dr.min,Qr=At(Qr=yr.now)&&Qr,Yr=n.parseInt,Zr=dr.random,ne=At(ne=Or.trim)&&!ne.call(X)&&ne,te=At(te=Or.trimLeft)&&!te.call(X)&&te,re=At(re=Or.trimRight)&&!re.call(X)&&re,ee={};ee[Y]=hr,ee[Z]=vr,ee[nt]=yr,ee[tt]=mr,ee[et]=_r,ee[rt]=br,ee[ut]=wr,ee[ot]=kr,m.prototype=y.prototype;var ue=y.support={};ue.funcDecomp=!At(n.WinRTError)&&U.test(b),ue.funcNames=typeof mr.name=="string";
|
||||
for(var o=er(n),i=u?u.length:0;++r<i;){var a=u[r],f=n[a]=t[a];o&&(n.prototype[a]=function(t){return function(){var r=this.__chain__,u=this.__wrapped__,o=[u];if(Dr.apply(o,arguments),o=t.apply(n,o),e||r){if(u===o&&ur(o))return this;o=new n(o),o.__chain__=r}return o}}(f))}}function sr(){}function gr(n){return function(t){return t[n]}}n=n?yt.defaults(gt.Object(),n,yt.pick(gt,J)):gt;var hr=n.Array,vr=n.Boolean,yr=n.Date,mr=n.Function,br=n.Math,dr=n.Number,_r=n.Object,wr=n.RegExp,kr=n.String,jr=n.TypeError,xr=hr.prototype,Cr=_r.prototype,Or=kr.prototype,Ar=(Ar=n.window)&&Ar.document,Sr=n._,Er=Cr.toString,Nr=wr("^"+kr(Er).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rr=br.ceil,Ir=n.clearTimeout,Tr=br.floor,Fr=mr.prototype.toString,$r=At($r=_r.getPrototypeOf)&&$r,Br=Cr.hasOwnProperty,Dr=xr.push,qr=At(qr=n.Set)&&qr,Wr=n.setTimeout,zr=xr.splice,Lr=xr.unshift,Pr=function(){try{var n={},t=At(t=_r.defineProperty)&&t,r=t(n,n,n)&&t
|
||||
}catch(e){}return r}(),Kr=At(Kr=Or.contains)&&Kr,Mr=At(Mr=_r.create)&&Mr,Ur=At(Ur=hr.isArray)&&Ur,Vr=n.isFinite,Xr=n.isNaN,Gr=At(Gr=_r.keys)&&Gr,Hr=br.max,Jr=br.min,Qr=At(Qr=yr.now)&&Qr,Yr=n.parseInt,Zr=br.random,ne=At(ne=Or.trim)&&!ne.call(X)&&ne,te=At(te=Or.trimLeft)&&!te.call(X)&&te,re=At(re=Or.trimRight)&&!re.call(X)&&re,ee={};ee[Y]=hr,ee[Z]=vr,ee[nt]=yr,ee[tt]=mr,ee[et]=_r,ee[rt]=dr,ee[ut]=wr,ee[ot]=kr,m.prototype=y.prototype;var ue=y.support={};ue.funcDecomp=!At(n.WinRTError)&&U.test(d),ue.funcNames=typeof mr.name=="string";
|
||||
try{ue.dom=11===Ar.createDocumentFragment().nodeType}catch(oe){ue.dom=false}y.templateSettings={escape:D,evaluate:q,interpolate:W,variable:"",imports:{_:y}},Mr||(lt=function(){function t(){}return function(r){if(ur(r)){t.prototype=r;var e=new t;t.prototype=null}return e||n.Object()}}());var ie=qr&&function(n){var t=new qr,r=n?n.length:0;for(t.push=t.add;r--;)t.push(n[r]);return t},ae=Pr?function(n,t){ft.value=t,Pr(n,N,ft)}:sr,fe=xt(function(n,t,r){Br.call(n,r)?n[r]++:n[r]=1}),le=xt(function(n,t,r){Br.call(n,r)?n[r].push(t):n[r]=[t]
|
||||
}),ce=xt(function(n,t,r){n[r]=t}),pe=Ut,se=Ur||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Er.call(n)==Y||false};ue.dom||(rr=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!ge(n)||false});var ge=$r?function(n){if(!n||Er.call(n)!=et)return false;var t=n.valueOf,r=At(t)&&(r=$r(t))&&$r(r);return r?n==r||$r(n)==r:St(n)}:St,he=Gr?function(n){return ur(n)?Gr(n):[]}:u,ve=ne?function(n,t){return null==n?"":null==t?ne.call(n):g(n,t)}:g,ye=te?function(n,t){return null==n?"":null==t?te.call(n):h(n,t)
|
||||
}:h,me=re?function(n,t){return null==n?"":null==t?re.call(n):v(n,t)}:v,de=Qr||function(){return(new yr).getTime()},be=8==Yr(X+"08")?Yr:function(n,t){return n=ve(n),Yr(n,+t||(K.test(n)?16:10))};return y.after=function(n,t){if(!er(t))throw new jr;return function(){return 1>--n?t.apply(this,arguments):void 0}},y.assign=Zt,y.at=function(n,t){var r=arguments,e=-1,u=mt(r,true,false,1),o=u.length,i=typeof t;for("number"!=i&&"string"!=i||!r[2]||r[2][t]!==n||(o=1),r=hr(o);++e<o;)r[e]=n[u[e]];return r},y.bind=Qt,y.bindAll=function(n){for(var t=1<arguments.length?mt(arguments,true,false,1):tr(n),r=-1,e=t.length;++r<e;){var u=t[r];
|
||||
}:h,me=re?function(n,t){return null==n?"":null==t?re.call(n):v(n,t)}:v,be=Qr||function(){return(new yr).getTime()},de=8==Yr(X+"08")?Yr:function(n,t){return n=ve(n),Yr(n,+t||(K.test(n)?16:10))};return y.after=function(n,t){if(!er(t))throw new jr;return function(){return 1>--n?t.apply(this,arguments):void 0}},y.assign=Zt,y.at=function(n,t){var r=arguments,e=-1,u=mt(r,true,false,1),o=u.length,i=typeof t;for("number"!=i&&"string"!=i||!r[2]||r[2][t]!==n||(o=1),r=hr(o);++e<o;)r[e]=n[u[e]];return r},y.bind=Qt,y.bindAll=function(n){for(var t=1<arguments.length?mt(arguments,true,false,1):tr(n),r=-1,e=t.length;++r<e;){var u=t[r];
|
||||
n[u]=Ct(n[u],w,null,n)}return n},y.bindKey=function(n,t){return 3>arguments.length?Ct(t,w|k,null,n):Ct(t,w|k|C,null,n,Tt(arguments,2))},y.chain=function(n){return n=new m(n),n.__chain__=true,n},y.compact=function(n){for(var t=-1,r=n?n.length:0,e=0,u=[];++t<r;){var o=n[t];o&&(u[e++]=o)}return u},y.compose=function(){for(var n=arguments,t=n.length,r=t;r--;)if(!er(n[r]))throw new jr;return function(){for(var r=t-1,e=n[r].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},y.constant=function(n){return function(){return n
|
||||
}},y.countBy=fe,y.create=function(n,t){var r=lt(n);return t?Zt(r,t):r},y.createCallback=fr,y.curry=function(n,t){return typeof t!="number"&&(t=+t||(n?n.length:0)),Ct(n,j,t)},y.debounce=Yt,y.defaults=nr,y.defer=function(n){if(!er(n))throw new jr;var t=Tt(arguments,1);return Wr(function(){n.apply(_,t)},1)},y.delay=function(n,t){if(!er(n))throw new jr;var r=Tt(arguments,2);return Wr(function(){n.apply(_,r)},t)},y.difference=function(n){return st(n,mt(arguments,true,true,1))},y.filter=Lt,y.flatten=function(n,t,r,e){var u=typeof t;
|
||||
return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(n=Ut(n,r,e)),mt(n,t)},y.forEach=Kt,y.forEachRight=Mt,y.forIn=function(n,t,r){return t=t&&typeof r=="undefined"?t:ct(t,r,3),o(n,t)},y.forInRight=function(n,t,r){var e=[];o(n,function(n,t){e.push(t,n)});var u=e.length;for(t=ct(t,r,3);u--&&false!==t(e[u--],e[u],n););return n},y.forOwn=function(n,t,r){return t=t&&typeof r=="undefined"?t:ct(t,r,3),dt(n,t)},y.forOwnRight=function(n,t,r){var e=he(n),u=e.length;
|
||||
return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(n=Ut(n,r,e)),mt(n,t)},y.forEach=Kt,y.forEachRight=Mt,y.forIn=function(n,t,r){return t=t&&typeof r=="undefined"?t:ct(t,r,3),o(n,t)},y.forInRight=function(n,t,r){var e=[];o(n,function(n,t){e.push(t,n)});var u=e.length;for(t=ct(t,r,3);u--&&false!==t(e[u--],e[u],n););return n},y.forOwn=function(n,t,r){return t=t&&typeof r=="undefined"?t:ct(t,r,3),bt(n,t)},y.forOwnRight=function(n,t,r){var e=he(n),u=e.length;
|
||||
for(t=ct(t,r,3);u--&&(r=e[u],false!==t(n[r],r,n)););return n},y.functions=tr,y.groupBy=le,y.indexBy=ce,y.initial=function(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=y.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return e=u-e,Tt(n,0,0<e?e:0)},y.intersection=function(){for(var n=[],e=-1,u=arguments.length,o=c(),i=Ot(),a=ie&&i===t,f=c();++e<u;){var l=arguments[e];(se(l)||Et(l))&&(n.push(l),o.push(a&&l.length>=A&&ie(e?n[e]:f)))}var a=n[0],s=-1,g=a?a.length:0,h=[];
|
||||
n:for(;++s<g;){var v=o[0],l=a[s];if(0>(v?r(v,l):i(f,l))){for(e=u,(v||f).push(l);--e;)if(v=o[e],0>(v?r(v,l):i(n[e],l)))continue n;h.push(l)}}return p(o),p(f),h},y.invert=function(n,t){for(var r=-1,e=he(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Br.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},y.invoke=function(n,t){var r=Tt(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=hr(typeof o=="number"?o:0);return ht(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},y.keys=he,y.map=Ut,y.mapValues=function(n,t,r){var e={};
|
||||
return t=y.createCallback(t,r,3),dt(n,function(n,r,u){e[r]=t(n,r,u)}),e},y.match=cr,y.max=Vt,y.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Br.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!er(n))throw new jr;return r.cache={},r},y.merge=function(n,t,r){if(!ur(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var i=ct(e[--u-1],e[u--],2);else 2<u&&"function"==typeof e[u-1]&&(i=e[--u]);
|
||||
for(var e=Tt(arguments,1,u),o=-1,a=c(),f=c();++o<u;)wt(n,e[o],i,a,f);return p(a),p(f),n},y.min=function(n,t,r){var u=1/0,o=u,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&se(n))for(r=-1,i=n.length;++r<i;){var a=n[r];a<o&&(o=a)}else t=null==t&&ir(n)?e:y.createCallback(t,r,3),ht(n,function(n,r,e){r=t(n,r,e),r<u&&(u=r,o=n)});return o},y.omit=function(n,t,r){var e={};if(typeof t!="function"){var u=[];o(n,function(n,t){u.push(t)});for(var u=st(u,mt(arguments,true,false,1)),i=-1,a=u.length;++i<a;){var f=u[i];
|
||||
e[f]=n[f]}}else t=y.createCallback(t,r,3),o(n,function(n,r,u){t(n,r,u)||(e[r]=n)});return e},y.once=function(n){var t,r;if(!er(n))throw new jr;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}},y.pairs=function(n){for(var t=-1,r=he(n),e=r.length,u=hr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},y.partial=function(n){var t=n&&(n[N]?n[N][2]:n.length),r=Tt(arguments,1),t=t-r.length;return Ct(n,C,t,null,r)},y.partialRight=function(n){var t=n&&(n[N]?n[N][2]:n.length),r=Tt(arguments,1),t=t-r.length;
|
||||
return Ct(n,O,t,null,null,r)},y.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=-1,i=mt(arguments,true,false,1),a=ur(n)?i.length:0;++u<a;){var f=i[u];f in n&&(e[f]=n[f])}else t=y.createCallback(t,r,3),o(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},y.pluck=pe,y.property=gr,y.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,i=t[r];++o<u;)n[o]===i&&(zr.call(n,o--,1),u--);return n},y.range=function(n,t,r){n=+n||0,r=typeof r=="number"?r:+r||1,null==t&&(t=n,n=0);
|
||||
var e=-1;t=Hr(0,Rr((t-n)/(r||1)));for(var u=hr(t);++e<t;)u[e]=n,n+=r;return u},y.reject=function(n,t,r){return t=y.createCallback(t,r,3),Lt(n,function(n,r,e){return!t(n,r,e)})},y.remove=function(n,t,r){var e=-1,u=n?n.length:0,o=[];for(t=y.createCallback(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(o.push(r),zr.call(n,e--,1),u--);return o},y.rest=It,y.shuffle=Ht,y.slice=Tt,y.sortBy=function(n,t,r){var e=-1,u=t&&se(t),o=n?n.length:0,f=hr(typeof o=="number"?o:0);for(u||(t=y.createCallback(t,r,3)),ht(n,function(n,r,o){if(u)for(o=t.length,r=hr(o);o--;)r[o]=n[t[o]];
|
||||
else r=t(n,r,o);o=f[++e]=H.pop()||{f:null,g:0,h:null},o.f=r,o.g=e,o.h=n}),o=f.length,f.sort(u?a:i);o--;)n=f[o],f[o]=n.h,s(n);return f},y.tap=function(n,t,r){return t.call(r,n),n},y.throttle=function(n,t,r){var e=true,u=true;if(!er(n))throw new jr;return false===r?e=false:ur(r)&&(e="leading"in r?r.leading:e,u="trailing"in r?r.trailing:u),at.leading=e,at.maxWait=t,at.trailing=u,Yt(n,t,at)},y.times=function(n,t,r){n=-1<(n=+n)?n:0;var e=-1,u=hr(n);for(t=ct(t,r,1);++e<n;)u[e]=t(e);return u},y.toArray=function(n){return n&&typeof n.length=="number"?Tt(n):ar(n)
|
||||
},y.transform=function(n,t,r,e){var u=se(n);if(null==r)if(u)r=[];else{var o=n&&n.constructor;r=lt(o&&o.prototype)}return t&&(t=y.createCallback(t,e,4),(u?ht:dt)(n,function(n,e,u){return t(r,n,e,u)})),r},y.union=function(){return jt(mt(arguments,true,true))},y.uniq=$t,y.values=ar,y.where=Lt,y.without=function(n){return st(n,Tt(arguments,1))},y.wrap=function(n,t){return Ct(t,C,null,null,[n])},y.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(se(r)||Et(r))var e=e?st(e,r).concat(st(r,e)):r
|
||||
}return e?jt(e):[]},y.zip=Bt,y.zipObject=Dt,y.callback=fr,y.collect=Ut,y.drop=It,y.each=Kt,y.eachRight=Mt,y.extend=Zt,y.methods=tr,y.object=Dt,y.select=Lt,y.tail=It,y.unique=$t,y.unzip=Bt,pr(Zt({},y)),y.capitalize=function(n){return null==n?"":(n=kr(n),n.charAt(0).toUpperCase()+n.slice(1))},y.clone=function(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),G(n,t,typeof r=="function"&&ct(r,e,1))},y.cloneDeep=function(n,t,r){return G(n,true,typeof t=="function"&&ct(t,r,1))
|
||||
},y.contains=Wt,y.escape=function(n){return null==n?"":kr(n).replace(B,f)},y.every=zt,y.find=Pt,y.findIndex=function(n,t,r){var e=-1,u=n?n.length:0;for(t=y.createCallback(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1},y.findKey=function(n,t,r){var e;return t=y.createCallback(t,r,3),dt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},y.findLast=function(n,t,r){var e;return t=y.createCallback(t,r,3),vt(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e},y.findLastIndex=function(n,t,r){var e=n?n.length:0;
|
||||
for(t=y.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},y.findLastKey=function(n,t,r){var e;return t=y.createCallback(t,r,3),bt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},y.has=function(n,t){return n?Br.call(n,t):false},y.identity=lr,y.indexOf=Rt,y.isArguments=Et,y.isArray=se,y.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Er.call(n)==Z||false},y.isDate=function(n){return n&&typeof n=="object"&&Er.call(n)==nt||false},y.isElement=rr,y.isEmpty=function(n){var t=true;
|
||||
if(!n)return t;var r=Er.call(n),e=n.length;return r==Y||r==ot||r==Q||r==et&&typeof e=="number"&&er(n.splice)?!e:(dt(n,function(){return t=false}),t)},y.isEqual=function(n,t,r,e){return _t(n,t,typeof r=="function"&&ct(r,e,2))},y.isFinite=function(n){return Vr(n)&&!Xr(parseFloat(n))},y.isFunction=er,y.isNaN=function(n){return or(n)&&n!=+n},y.isNull=function(n){return null===n},y.isNumber=or,y.isObject=ur,y.isPlainObject=ge,y.isRegExp=function(n){return n&&typeof n=="object"&&Er.call(n)==ut||false},y.isString=ir,y.isUndefined=function(n){return typeof n=="undefined"
|
||||
},y.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Hr(0,e+r):Jr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},y.mixin=pr,y.noConflict=function(){return n._=Sr,this},y.noop=sr,y.now=de,y.parseInt=be,y.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Zr(),Jr(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):kt(n,t)},y.reduce=Xt,y.reduceRight=Gt,y.result=function(n,t,r){return null==n?r:(r="undefined"!=typeof n[t]?n[t]:r,er(r)?n[t]():r)
|
||||
},y.runInContext=b,y.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:he(n).length},y.some=Jt,y.sortedIndex=Ft,y.template=function(n,t,r){var e=y.templateSettings;n=kr(n||""),r=nr({},r,e);var u,o=nr({},r.imports,e.imports),e=he(o),o=ar(o),i=0,a=r.interpolate||M,f="__p+='",a=wr((r.escape||M).source+"|"+a.source+"|"+(a===W?z:M).source+"|"+(r.evaluate||M).source+"|$","g");n.replace(a,function(t,r,e,o,a,c){return e||(e=o),f+=n.slice(i,c).replace(V,l),r&&(f+="'+__e("+r+")+'"),a&&(u=true,f+="';"+a+";\n__p+='"),e&&(f+="'+((__t=("+e+"))==null?'':__t)+'"),i=c+t.length,t
|
||||
}),f+="';",a=r=r.variable,a||(r="obj",f="with("+r+"){"+f+"}"),f=(u?f.replace(I,""):f).replace(T,"$1").replace(F,"$1;"),f="function("+r+"){"+(a?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}";try{var c=mr(e,"return "+f).apply(_,o)}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},y.trim=ve,y.trimLeft=ye,y.trimRight=me,y.unescape=function(n){return null==n?"":(n=kr(n),0>n.indexOf(";")?n:n.replace($,d))
|
||||
},y.uniqueId=function(n){var t=++R;return kr(null==n?"":n)+t},y.all=zt,y.any=Jt,y.detect=Pt,y.findWhere=Pt,y.foldl=Xt,y.foldr=Gt,y.include=Wt,y.inject=Xt,pr(function(){var n={};return dt(y,function(t,r){y.prototype[r]||(n[r]=t)}),n}(),false),y.first=Nt,y.last=function(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=y.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n?n[u-1]:_;return e=u-e,Tt(n,0<e?e:0)},y.sample=function(n,t,r){return n&&typeof n.length!="number"&&(n=ar(n)),null==t||r?n?n[kt(0,n.length-1)]:_:(n=Ht(n),n.length=Jr(Hr(0,t),n.length),n)
|
||||
},y.take=Nt,y.head=Nt,dt(y,function(n,t){var r="sample"!==t;y.prototype[t]||(y.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new m(o,u):o})}),y.VERSION=E,y.prototype.chain=function(){return this.__chain__=true,this},y.prototype.toString=function(){return kr(this.__wrapped__)},y.prototype.value=qt,y.prototype.valueOf=qt,ht(["join","pop","shift"],function(n){var t=xr[n];y.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);
|
||||
return n?new m(r,n):r}}),ht(["push","reverse","sort","unshift"],function(n){var t=xr[n];y.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ht(["concat","splice"],function(n){var t=xr[n];y.prototype[n]=function(){return new m(t.apply(this.__wrapped__,arguments),this.__chain__)}}),y}var _,w=1,k=2,j=4,x=8,C=16,O=32,A=40,S=40,E="2.4.1",N="__lodash@"+E+"__",R=0,I=/\b__p\+='';/g,T=/\b(__p\+=)''\+/g,F=/(__e\(.*?\)|\b__t\))\+'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,D=/<%-([\s\S]+?)%>/g,q=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,z=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,L=/\w*$/,P=/^\s*function[ \n\r\t]+\w/,K=/^0[xX]/,M=/($^)/,U=/\bthis\b/,V=/['\n\r\t\u2028\u2029\\]/g,X=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",G=[],H=[],J="Array Boolean Date Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),Q="[object Arguments]",Y="[object Array]",Z="[object Boolean]",nt="[object Date]",tt="[object Function]",rt="[object Number]",et="[object Object]",ut="[object RegExp]",ot="[object String]",it={};
|
||||
n:for(;++s<g;){var v=o[0],l=a[s];if(0>(v?r(v,l):i(f,l))){for(e=u,(v||f).push(l);--e;)if(v=o[e],0>(v?r(v,l):i(n[e],l)))continue n;h.push(l)}}return p(o),p(f),h},y.invert=function(n,t){for(var r=-1,e=he(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Br.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},y.invoke=function(n,t){var r=-1,e=typeof t=="function",u=n?n.length:0,o=hr(typeof u=="number"?u:0);if(3>arguments.length&&typeof u=="number")for(;++r<u;){var i=n[r];o[r]=e?t.call(i):i[t]()}else{var a=Tt(arguments,2);
|
||||
ht(n,function(n){o[++r]=(e?t:n[t]).apply(n,a)})}return o},y.keys=he,y.map=Ut,y.mapValues=function(n,t,r){var e={};return t=y.createCallback(t,r,3),bt(n,function(n,r,u){e[r]=t(n,r,u)}),e},y.match=cr,y.max=Vt,y.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Br.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!er(n))throw new jr;return r.cache={},r},y.merge=function(n,t,r){if(!ur(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var i=ct(e[--u-1],e[u--],2);
|
||||
else 2<u&&"function"==typeof e[u-1]&&(i=e[--u]);for(var e=Tt(arguments,1,u),o=-1,a=c(),f=c();++o<u;)wt(n,e[o],i,a,f);return p(a),p(f),n},y.min=function(n,t,r){var u=1/0,o=u,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&se(n))for(r=-1,i=n.length;++r<i;){var a=n[r];a<o&&(o=a)}else t=null==t&&ir(n)?e:y.createCallback(t,r,3),ht(n,function(n,r,e){r=t(n,r,e),r<u&&(u=r,o=n)});return o},y.omit=function(n,t,r){var e={};if(typeof t!="function"){var u=[];o(n,function(n,t){u.push(t)
|
||||
});for(var u=st(u,mt(arguments,true,false,1)),i=-1,a=u.length;++i<a;){var f=u[i];e[f]=n[f]}}else t=y.createCallback(t,r,3),o(n,function(n,r,u){t(n,r,u)||(e[r]=n)});return e},y.once=function(n){var t,r;if(!er(n))throw new jr;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}},y.pairs=function(n){for(var t=-1,r=he(n),e=r.length,u=hr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},y.partial=function(n){var t=n&&(n[N]?n[N][2]:n.length),r=Tt(arguments,1),t=t-r.length;return Ct(n,C,t,null,r)
|
||||
},y.partialRight=function(n){var t=n&&(n[N]?n[N][2]:n.length),r=Tt(arguments,1),t=t-r.length;return Ct(n,O,t,null,null,r)},y.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=-1,i=mt(arguments,true,false,1),a=ur(n)?i.length:0;++u<a;){var f=i[u];f in n&&(e[f]=n[f])}else t=y.createCallback(t,r,3),o(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},y.pluck=pe,y.property=gr,y.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,i=t[r];++o<u;)n[o]===i&&(zr.call(n,o--,1),u--);
|
||||
return n},y.range=function(n,t,r){n=+n||0,r=typeof r=="number"?r:+r||1,null==t&&(t=n,n=0);var e=-1;t=Hr(0,Rr((t-n)/(r||1)));for(var u=hr(t);++e<t;)u[e]=n,n+=r;return u},y.reject=function(n,t,r){return t=y.createCallback(t,r,3),Lt(n,function(n,r,e){return!t(n,r,e)})},y.remove=function(n,t,r){var e=-1,u=n?n.length:0,o=[];for(t=y.createCallback(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(o.push(r),zr.call(n,e--,1),u--);return o},y.rest=It,y.shuffle=Ht,y.slice=Tt,y.sortBy=function(n,t,r){var e=-1,u=t&&se(t),o=n?n.length:0,f=hr(typeof o=="number"?o:0);
|
||||
for(u||(t=y.createCallback(t,r,3)),ht(n,function(n,r,o){if(u)for(o=t.length,r=hr(o);o--;)r[o]=n[t[o]];else r=t(n,r,o);o=f[++e]=H.pop()||{f:null,g:0,h:null},o.f=r,o.g=e,o.h=n}),o=f.length,f.sort(u?a:i);o--;)n=f[o],f[o]=n.h,s(n);return f},y.tap=function(n,t,r){return t.call(r,n),n},y.throttle=function(n,t,r){var e=true,u=true;if(!er(n))throw new jr;return false===r?e=false:ur(r)&&(e="leading"in r?r.leading:e,u="trailing"in r?r.trailing:u),at.leading=e,at.maxWait=t,at.trailing=u,Yt(n,t,at)},y.times=function(n,t,r){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=hr(n);for(t=ct(t,r,1);++e<n;)u[e]=t(e);return u},y.toArray=function(n){return n&&typeof n.length=="number"?Tt(n):ar(n)},y.transform=function(n,t,r,e){var u=se(n);if(null==r)if(u)r=[];else{var o=n&&n.constructor;r=lt(o&&o.prototype)}return t&&(t=y.createCallback(t,e,4),(u?ht:bt)(n,function(n,e,u){return t(r,n,e,u)})),r},y.union=function(){return jt(mt(arguments,true,true))},y.uniq=$t,y.values=ar,y.where=Lt,y.without=function(n){return st(n,Tt(arguments,1))},y.wrap=function(n,t){return Ct(t,C,null,null,[n])
|
||||
},y.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(se(r)||Et(r))var e=e?st(e,r).concat(st(r,e)):r}return e?jt(e):[]},y.zip=Bt,y.zipObject=Dt,y.callback=fr,y.collect=Ut,y.drop=It,y.each=Kt,y.eachRight=Mt,y.extend=Zt,y.methods=tr,y.object=Dt,y.select=Lt,y.tail=It,y.unique=$t,y.unzip=Bt,pr(Zt({},y)),y.capitalize=function(n){return null==n?"":(n=kr(n),n.charAt(0).toUpperCase()+n.slice(1))},y.clone=function(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),G(n,t,typeof r=="function"&&ct(r,e,1))
|
||||
},y.cloneDeep=function(n,t,r){return G(n,true,typeof t=="function"&&ct(t,r,1))},y.contains=Wt,y.escape=function(n){return null==n?"":kr(n).replace(B,f)},y.every=zt,y.find=Pt,y.findIndex=function(n,t,r){var e=-1,u=n?n.length:0;for(t=y.createCallback(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1},y.findKey=function(n,t,r){var e;return t=y.createCallback(t,r,3),bt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},y.findLast=function(n,t,r){var e;return t=y.createCallback(t,r,3),vt(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0
|
||||
}),e},y.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=y.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},y.findLastKey=function(n,t,r){var e;return t=y.createCallback(t,r,3),dt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},y.has=function(n,t){return n?Br.call(n,t):false},y.identity=lr,y.indexOf=Rt,y.isArguments=Et,y.isArray=se,y.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Er.call(n)==Z||false},y.isDate=function(n){return n&&typeof n=="object"&&Er.call(n)==nt||false
|
||||
},y.isElement=rr,y.isEmpty=function(n){var t=true;if(!n)return t;var r=Er.call(n),e=n.length;return r==Y||r==ot||r==Q||r==et&&typeof e=="number"&&er(n.splice)?!e:(bt(n,function(){return t=false}),t)},y.isEqual=function(n,t,r,e){return _t(n,t,typeof r=="function"&&ct(r,e,2))},y.isFinite=function(n){return Vr(n)&&!Xr(parseFloat(n))},y.isFunction=er,y.isNaN=function(n){return or(n)&&n!=+n},y.isNull=function(n){return null===n},y.isNumber=or,y.isObject=ur,y.isPlainObject=ge,y.isRegExp=function(n){return n&&typeof n=="object"&&Er.call(n)==ut||false
|
||||
},y.isString=ir,y.isUndefined=function(n){return typeof n=="undefined"},y.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Hr(0,e+r):Jr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},y.mixin=pr,y.noConflict=function(){return n._=Sr,this},y.noop=sr,y.now=be,y.parseInt=de,y.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Zr(),Jr(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):kt(n,t)
|
||||
},y.reduce=Xt,y.reduceRight=Gt,y.result=function(n,t,r){return null==n?r:(r="undefined"!=typeof n[t]?n[t]:r,er(r)?n[t]():r)},y.runInContext=d,y.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:he(n).length},y.some=Jt,y.sortedIndex=Ft,y.template=function(n,t,r){var e=y.templateSettings;n=kr(n||""),r=nr({},r,e);var u,o=nr({},r.imports,e.imports),e=he(o),o=ar(o),i=0,a=r.interpolate||M,f="__p+='",a=wr((r.escape||M).source+"|"+a.source+"|"+(a===W?z:M).source+"|"+(r.evaluate||M).source+"|$","g");
|
||||
n.replace(a,function(t,r,e,o,a,c){return e||(e=o),f+=n.slice(i,c).replace(V,l),r&&(f+="'+__e("+r+")+'"),a&&(u=true,f+="';"+a+";\n__p+='"),e&&(f+="'+((__t=("+e+"))==null?'':__t)+'"),i=c+t.length,t}),f+="';",a=r=r.variable,a||(r="obj",f="with("+r+"){"+f+"}"),f=(u?f.replace(I,""):f).replace(T,"$1").replace(F,"$1;"),f="function("+r+"){"+(a?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}";try{var c=mr(e,"return "+f).apply(_,o)
|
||||
}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},y.trim=ve,y.trimLeft=ye,y.trimRight=me,y.unescape=function(n){return null==n?"":(n=kr(n),0>n.indexOf(";")?n:n.replace($,b))},y.uniqueId=function(n){var t=++R;return kr(null==n?"":n)+t},y.all=zt,y.any=Jt,y.detect=Pt,y.findWhere=Pt,y.foldl=Xt,y.foldr=Gt,y.include=Wt,y.inject=Xt,pr(function(){var n={};return bt(y,function(t,r){y.prototype[r]||(n[r]=t)}),n}(),false),y.first=Nt,y.last=function(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;
|
||||
for(t=y.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n?n[u-1]:_;return e=u-e,Tt(n,0<e?e:0)},y.sample=function(n,t,r){return n&&typeof n.length!="number"&&(n=ar(n)),null==t||r?n?n[kt(0,n.length-1)]:_:(n=Ht(n),n.length=Jr(Hr(0,t),n.length),n)},y.take=Nt,y.head=Nt,bt(y,function(n,t){var r="sample"!==t;y.prototype[t]||(y.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new m(o,u):o})}),y.VERSION=E,y.prototype.chain=function(){return this.__chain__=true,this
|
||||
},y.prototype.toString=function(){return kr(this.__wrapped__)},y.prototype.value=qt,y.prototype.valueOf=qt,ht(["join","pop","shift"],function(n){var t=xr[n];y.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new m(r,n):r}}),ht(["push","reverse","sort","unshift"],function(n){var t=xr[n];y.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ht(["concat","splice"],function(n){var t=xr[n];y.prototype[n]=function(){return new m(t.apply(this.__wrapped__,arguments),this.__chain__)
|
||||
}}),y}var _,w=1,k=2,j=4,x=8,C=16,O=32,A=40,S=40,E="2.4.1",N="__lodash@"+E+"__",R=0,I=/\b__p\+='';/g,T=/\b(__p\+=)''\+/g,F=/(__e\(.*?\)|\b__t\))\+'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,D=/<%-([\s\S]+?)%>/g,q=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,z=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,L=/\w*$/,P=/^\s*function[ \n\r\t]+\w/,K=/^0[xX]/,M=/($^)/,U=/\bthis\b/,V=/['\n\r\t\u2028\u2029\\]/g,X=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",G=[],H=[],J="Array Boolean Date Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),Q="[object Arguments]",Y="[object Array]",Z="[object Boolean]",nt="[object Date]",tt="[object Function]",rt="[object Number]",et="[object Object]",ut="[object RegExp]",ot="[object String]",it={};
|
||||
it[tt]=false,it[Q]=it[Y]=it[Z]=it[nt]=it[rt]=it[et]=it[ut]=it[ot]=true;var at={leading:false,maxWait:0,trailing:false},ft={configurable:false,enumerable:false,value:null,writable:false},lt={"&":"&","<":"<",">":">",'"':""","'":"'"},ct={"&":"&","<":"<",">":">",""":'"',"'":"'"},pt={"function":true,object:true},st={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},gt=pt[typeof window]&&window||this,ht=pt[typeof exports]&&exports&&!exports.nodeType&&exports,pt=pt[typeof module]&&module&&!module.nodeType&&module,vt=ht&&pt&&typeof global=="object"&&global;
|
||||
!vt||vt.global!==vt&&vt.window!==vt&&vt.self!==vt||(gt=vt);var vt=pt&&pt.exports===ht&&ht,yt=b();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(gt._=yt, define(function(){return yt})):ht&&pt?vt?(pt.exports=yt)._=yt:ht._=yt:gt._=yt}).call(this);
|
||||
!vt||vt.global!==vt&&vt.window!==vt&&vt.self!==vt||(gt=vt);var vt=pt&&pt.exports===ht&&ht,yt=d();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(gt._=yt, define(function(){return yt})):ht&&pt?vt?(pt.exports=yt)._=yt:ht._=yt:gt._=yt}).call(this);
|
||||
17
dist/lodash.underscore.js
vendored
17
dist/lodash.underscore.js
vendored
@@ -2481,15 +2481,22 @@
|
||||
* // => [['1', '2', '3'], ['4', '5', '6']]
|
||||
*/
|
||||
function invoke(collection, methodName) {
|
||||
var args = slice(arguments, 2),
|
||||
index = -1,
|
||||
var index = -1,
|
||||
isFunc = typeof methodName == 'function',
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
if (arguments.length < 3 && typeof length == 'number') {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
result[index] = isFunc ? methodName.call(value) : value[methodName]();
|
||||
}
|
||||
} else {
|
||||
var args = slice(arguments, 2);
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
70
dist/lodash.underscore.min.js
vendored
70
dist/lodash.underscore.min.js
vendored
@@ -3,38 +3,38 @@
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
||||
*/
|
||||
;(function(){function n(n){var r=[];if(!L(n))return r;for(var t in n)Ur.call(n,t)&&r.push(t);return r}function r(n,r){if(L(n))for(var t in n)if(r(n[t],t,n)===sr)break}function t(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function e(n,r){var t;n:{t=n.f;var e=r.f;if(t!==e){if(t>e||typeof t=="undefined"){t=1;break n}if(t<e||typeof e=="undefined"){t=-1;break n}}t=0}return t||n.g-r.g}function u(n){return Er[n]}function o(n){return"\\"+Sr[n]}function i(n){return Or[n]}function f(n){return n instanceof f?n:new a(n)
|
||||
}function a(n,r){this.__chain__=!!r,this.__wrapped__=n}function l(n){function r(){if(u){var n=O(u);Vr.apply(n,arguments)}if(this instanceof r){var o=c(t.prototype),n=t.apply(o,n||arguments);return L(n)?n:o}return t.apply(e,n||arguments)}var t=n[0],e=n[3],u=n[4];return r}function c(n){return L(n)?Jr(n):{}}function p(n,r,t){if(typeof n!="function")return nr;if(typeof r=="undefined"||!("prototype"in n))return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)
|
||||
};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return P(n,r)}function s(n){function r(){var n=a?o:this;if(i){var v=O(i);Vr.apply(v,arguments)}if(f||p){v||(v=O(arguments)),f&&Vr.apply(v,f);var y=arguments.length;if(p&&y<u)return e|=lr,e&=~cr,g||(e&=~(or|ir)),n=Yr(0,u-y),s([t,e,n,o,v])}return v||(v=arguments),l&&(t=n[h]),this instanceof r?(n=c(t.prototype),v=t.apply(n,v),L(v)?v:n):t.apply(n,v)}var t=n[0],e=n[1],u=n[2],o=n[3],i=n[4],f=n[5],a=e&or,l=e&ir,p=e&fr,g=e&ar,h=t;
|
||||
return r}function g(n,r){for(var t=-1,e=w(),u=n?n.length:0,o=[];++t<u;){var i=n[t];0>e(r,i)&&o.push(i)}return o}function h(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(;++t<e&&r(n[t],t,n)!==sr;);else for(var t=-1,e=at(n),u=e.length;++t<u;){var o=e[t];if(r(n[o],o,n)===sr)break}}function v(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&r(n[t],t,n)!==sr;);else for(var t=at(n),e=t.length;e--;){var u=t[e];if(r(n[u],u,n)===sr)break}}function y(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];
|
||||
if(i&&typeof i=="object"&&typeof i.length=="number"&&(ft(i)||x(i))){r||(i=y(i,r,t));var f=-1,a=i.length,l=o.length;for(o.length+=a;++f<a;)o[l++]=i[f]}else t||o.push(i)}return o}function m(n,t,e,u){if(n===t)return 0!==n||1/n==1/t;var o=typeof n,i=typeof t;if(n===n&&(!n||"function"!=o&&"object"!=o)&&(!t||"function"!=i&&"object"!=i))return false;if(null==n||null==t)return n===t;if(i=Dr.call(n),o=Dr.call(t),i!=o)return false;switch(i){case dr:case wr:return+n==+t;case jr:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;
|
||||
case Tr:case Ar:return n==t+""}if(o=i==_r,!o){var a=n instanceof f,l=t instanceof f;if(a||l)return m(a?n.__wrapped__:n,l?t.__wrapped__:t,e,u);if(i!=xr)return false;if(i=Ur.call(n,"constructor"),a=Ur.call(t,"constructor"),i!==a||!i&&(i=n.constructor,a=t.constructor,i!=a&&!(K(i)&&i instanceof i&&K(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t))return false}for(e||(e=[]),u||(u=[]),i=e.length;i--;)if(e[i]==n)return u[i]==t;var c=true,p=0;if(e.push(n),u.push(t),o){if(p=t.length,c=p==n.length)for(;p--&&(c=m(n[p],t[p],e,u)););}else r(t,function(r,t,o){return Ur.call(o,t)?(p++,!(c=Ur.call(n,t)&&m(n[t],r,e,u))&&sr):void 0
|
||||
}),c&&r(n,function(n,r,t){return Ur.call(t,r)?!(c=-1<--p)&&sr:void 0});return e.pop(),u.pop(),c}function b(n,r,t){for(var e=-1,u=w(),o=n?n.length:0,i=[],f=t?[]:i;++e<o;){var a=n[e],l=t?t(a,e,n):a;(r?!e||f[f.length-1]!==l:0>u(f,l))&&(t&&f.push(l),i.push(a))}return i}function _(n){return function(r,t,e){var u={};t=Z(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++e<o;){var i=r[e];n(u,i,t(i,e,r),r)}else h(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function d(n,r,t,e,u){var o,i=r&ir,f=r&lr,a=r&cr;
|
||||
if(!i&&!K(n))throw new TypeError;return f&&!u.length&&(r&=~lr,u=false),a&&!o.length&&(r&=~cr,o=false),null==t?t=i?0:n.length:0>t&&(t=0),n=[n,r,t,e,u,o],r==or||r==(or|lr)?l(n):s(n)}function w(){var n=(n=f.indexOf)===A?t:n;return n}function j(n){return typeof n=="function"&&Wr.test(Pr.call(n))}function x(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Dr.call(n)==br||false}function T(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=-1;for(r=Z(r,t,3);++o<u&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[0]:ur;
|
||||
return O(n,0,0<e?e:0)}function A(n,r,e){var u=n?n.length:0;if(typeof e=="number")e=0>e?Yr(0,u+e):e||0;else if(e)return e=k(n,r),u&&n[e]===r?e:-1;return t(n,r,e)}function E(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,o=n?n.length:0;for(r=Z(r,t,3);++u<o&&r(n[u],u,n);)e++}else e=null==r||t?1:0<r?r:0;return O(n,e)}function O(n,r,t){var e=-1,u=n?n.length:0;for(typeof r=="undefined"?r=0:0>r?r=Yr(u+r,0):r>u&&(r=u),typeof t=="undefined"?t=u:0>t?t=Yr(u+t,0):t>u&&(t=u),u=t-r||0,t=Array(u);++e<u;)t[e]=n[r+e];
|
||||
return t}function k(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?Z(t,e,1):nr,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function S(n,r,t,e){var u=typeof r;return"boolean"!=u&&null!=r&&(e=t,t=r,r=false,"number"!=u&&"string"!=u||!e||e[t]!==n||(t=null)),null!=t&&(t=Z(t,e,3)),b(n,r,t)}function N(n,r){var t=w(),e=n?n.length:0,u=false;return e&&typeof e=="number"?u=-1<t(n,r):h(n,function(n){return(u=n===r)&&sr}),u}function q(n,r,t){var e=true;r=Z(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else h(n,function(n,t,u){return!(e=!!r(n,t,u))&&sr
|
||||
});return e}function F(n,r,t){var e=[];r=Z(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else h(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function B(n,r,t){r=Z(r,t,3),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return h(n,function(n,t,e){return r(n,t,e)?(u=n,sr):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o}}function R(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:p(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==sr;);else h(n,r)
|
||||
}function $(n,r,t){var e=-1,u=n?n.length:0;if(r=Z(r,t,3),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],h(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function I(n,r,t){var e=-1/0,u=e,o=typeof r;"number"!=o&&"string"!=o||!t||t[r]!==n||(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t>u&&(u=t);else r=Z(r,t,3),h(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function M(n,r,t,e){var u=3>arguments.length;r=Z(r,e,4);var o=-1,i=n?n.length:0;
|
||||
if(typeof i=="number")for(u&&i&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else h(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)});return t}function D(n,r,t,e){var u=3>arguments.length;return r=Z(r,e,4),v(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function W(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return h(n,function(n){var t;t=++r,t=0+Cr(rt()*(t-0+1)),e[r]=e[t],e[t]=n}),e}function z(n,r,t){var e;r=Z(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else h(n,function(n,t,u){return(e=r(n,t,u))&&sr
|
||||
});return!!e}function C(n,r,t){return t&&J(r)?ur:(t?B:F)(n,r)}function P(n,r){if(3>arguments.length)return d(n,or,null,r);var t=n&&(n[pr]?n[pr][2]:n.length),e=O(arguments,2),t=t-e.length;return d(n,or|lr,t,r,e)}function U(n,r,t){function e(){c&&clearTimeout(c),i=c=p=ur,(h||g!==r)&&(s=lt(),f=n.apply(l,o),c||i||(o=l=null))}function u(){var t=r-(lt()-a);0<t?c=setTimeout(u,t):(i&&clearTimeout(i),t=p,i=c=p=ur,t&&(s=lt(),f=n.apply(l,o),c||i||(o=l=null)))}var o,i,f,a,l,c,p,s=0,g=false,h=true;if(!K(n))throw new TypeError;
|
||||
if(r=Yr(0,r)||0,true===t)var v=true,h=false;else L(t)&&(v=t.leading,g="maxWait"in t&&(Yr(r,t.maxWait)||0),h="trailing"in t?t.trailing:h);return function(){if(o=arguments,a=lt(),l=this,p=h&&(c||!v),false===g)var t=v&&!c;else{i||v||(s=a);var y=g-(a-s),m=0>=y;m?(i&&(i=clearTimeout(i)),s=a,f=n.apply(l,o)):i||(i=setTimeout(e,y))}return m&&c?c=clearTimeout(c):c||r===g||(c=setTimeout(u,r)),t&&(m=true,f=n.apply(l,o)),!m||c||i||(o=l=null),f}}function V(n,r,t){if(!n)return n;var e=arguments,u=0,o=e.length,i=typeof t;for("number"!=i&&"string"!=i||!e[3]||e[3][t]!==r||(o=2);++u<o;)if(r=e[u])for(var f in r)n[f]=r[f];
|
||||
return n}function G(n,r,t){if(!n)return n;var e=arguments,u=0,o=e.length,i=typeof t;for("number"!=i&&"string"!=i||!e[3]||e[3][t]!==r||(o=2);++u<o;)if(r=e[u])for(var f in r)"undefined"==typeof n[f]&&(n[f]=r[f]);return n}function H(n){var t=[];return r(n,function(n,r){K(n)&&t.push(r)}),t.sort()}function J(n){if(!n)return true;if(ft(n)||X(n))return!n.length;for(var r in n)if(Ur.call(n,r))return false;return true}function K(n){return typeof n=="function"}function L(n){var r=typeof n;return n&&("function"==r||"object"==r)||false
|
||||
}function Q(n){var r=typeof n;return"number"==r||n&&"object"==r&&Dr.call(n)==jr||false}function X(n){return typeof n=="string"||n&&typeof n=="object"&&Dr.call(n)==Ar||false}function Y(n){for(var r=-1,t=at(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function Z(n,r,t){var e=typeof n;return null==n||"function"==e?p(n,r,t):"object"!=e?er(n):rr(n)}function nr(n){return n}function rr(n){n||(n={});var r=at(n);return function(t){for(var e=r.length,u=false;e--&&(u=r[e],u=Ur.call(t,u)&&t[u]===n[u]););return u
|
||||
}}function tr(n){for(var r=-1,t=H(n),e=t.length;++r<e;){var u=t[r];f.prototype[u]=function(){var r=f[u]=n[u];return function(){var n=[this.__wrapped__];return Vr.apply(n,arguments),n=r.apply(f,n),this.__chain__?new a(n,true):n}}()}}function er(n){return function(r){return r[n]}}var ur,or=1,ir=2,fr=4,ar=8,lr=16,cr=32,pr="__lodash@2.4.1__",sr=pr+"breaker__",gr=0,hr=/&(?:amp|lt|gt|quot|#x27);/g,vr=/[&<>"']/g,yr=/($^)/,mr=/['\n\r\t\u2028\u2029\\]/g,br="[object Arguments]",_r="[object Array]",dr="[object Boolean]",wr="[object Date]",jr="[object Number]",xr="[object Object]",Tr="[object RegExp]",Ar="[object String]",Er={"&":"&","<":"<",">":">",'"':""","'":"'"},Or={"&":"&","<":"<",">":">",""":'"',"'":"'"},kr={"function":true,object:true},Sr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Nr=kr[typeof window]&&window||this,qr=kr[typeof exports]&&exports&&!exports.nodeType&&exports,Fr=kr[typeof module]&&module&&!module.nodeType&&module,Br=qr&&Fr&&typeof global=="object"&&global;
|
||||
!Br||Br.global!==Br&&Br.window!==Br&&Br.self!==Br||(Nr=Br);var Rr=Fr&&Fr.exports===qr&&qr,$r=Array.prototype,Ir=Object.prototype,Mr=Nr._,Dr=Ir.toString,Wr=RegExp("^"+(Dr+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zr=Math.ceil,Cr=Math.floor,Pr=Function.prototype.toString,Ur=Ir.hasOwnProperty,Vr=$r.push,Gr=Ir.propertyIsEnumerable,Hr=$r.splice,Jr=j(Jr=Object.create)&&Jr,Kr=j(Kr=Array.isArray)&&Kr,Lr=Nr.isFinite,Qr=Nr.isNaN,Xr=j(Xr=Object.keys)&&Xr,Yr=Math.max,Zr=Math.min,nt=j(nt=Date.now)&&nt,rt=Math.random;
|
||||
a.prototype=f.prototype;var tt={};!function(){var n={0:1,length:1};tt.spliceObjects=(Hr.call(n,0,1),!n[0])}(1),f.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Jr||(c=function(){function n(){}return function(r){if(L(r)){n.prototype=r;var t=new n;n.prototype=null}return t||Nr.Object()}}()),x(arguments)||(x=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ur.call(n,"callee")&&!Gr.call(n,"callee")||false});var et=_(function(n,r,t){Ur.call(n,t)?n[t]++:n[t]=1
|
||||
}),ut=_(function(n,r,t){Ur.call(n,t)?n[t].push(r):n[t]=[r]}),ot=_(function(n,r,t){n[t]=r}),it=$,ft=Kr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Dr.call(n)==_r||false};K(/x/)&&(K=function(n){return typeof n=="function"&&"[object Function]"==Dr.call(n)});var at=Xr?function(n){return L(n)?Xr(n):[]}:n,lt=nt||function(){return(new Date).getTime()};f.after=function(n,r){if(!K(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},f.bind=P,f.bindAll=function(n){for(var r=1<arguments.length?y(arguments,true,false,1):H(n),t=-1,e=r.length;++t<e;){var u=r[t];
|
||||
n[u]=d(n[u],or,null,n)}return n},f.chain=function(n){return n=new a(n),n.__chain__=true,n},f.compact=function(n){for(var r=-1,t=n?n.length:0,e=0,u=[];++r<t;){var o=n[r];o&&(u[e++]=o)}return u},f.compose=function(){for(var n=arguments,r=n.length,t=r;t--;)if(!K(n[t]))throw new TypeError;return function(){for(var t=r-1,e=n[t].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},f.countBy=et,f.debounce=U,f.defaults=G,f.defer=function(n){if(!K(n))throw new TypeError;var r=O(arguments,1);return setTimeout(function(){n.apply(ur,r)
|
||||
},1)},f.delay=function(n,r){if(!K(n))throw new TypeError;var t=O(arguments,2);return setTimeout(function(){n.apply(ur,t)},r)},f.difference=function(n){return g(n,y(arguments,true,true,1))},f.filter=F,f.flatten=function(n,r,t){var e=typeof r;return"number"!=e&&"string"!=e||!t||t[r]!==n||(r=false),y(n,r)},f.forEach=R,f.functions=H,f.groupBy=ut,f.indexBy=ot,f.initial=function(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=u;for(r=Z(r,t,3);o--&&r(n[o],o,n);)e++}else e=null==r||t?1:r||e;
|
||||
return e=u-e,O(n,0,0<e?e:0)},f.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];(ft(e)||x(e))&&n.push(e)}var u=n[0],o=-1,i=w(),f=u?u.length:0,a=[];n:for(;++o<f;)if(e=u[o],0>i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},f.invert=function(n){for(var r=-1,t=at(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u},f.invoke=function(n,r){var t=O(arguments,2),e=-1,u=typeof r=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return h(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)
|
||||
}),i},f.keys=at,f.map=$,f.max=I,f.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):"_"+arguments[0];return Ur.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},f.min=function(n,r,t){var e=1/0,u=e,o=typeof r;"number"!=o&&"string"!=o||!t||t[r]!==n||(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);else r=Z(r,t,3),h(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},f.omit=function(n){var t=[];r(n,function(n,r){t.push(r)});
|
||||
for(var t=g(t,y(arguments,true,false,1)),e=-1,u=t.length,o={};++e<u;){var i=t[e];o[i]=n[i]}return o},f.once=function(n){var r,t;if(!K(n))throw new TypeError;return function(){return r?t:(r=true,t=n.apply(this,arguments),n=null,t)}},f.pairs=function(n){for(var r=-1,t=at(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},f.partial=function(n){var r=n&&(n[pr]?n[pr][2]:n.length),t=O(arguments,1),r=r-t.length;return d(n,lr,r,null,t)},f.pick=function(n){for(var r=-1,t=y(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];
|
||||
o in n&&(u[o]=n[o])}return u},f.pluck=it,f.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Yr(0,zr((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},f.reject=function(n,r,t){return r=Z(r,t,3),F(n,function(n,t,e){return!r(n,t,e)})},f.rest=E,f.shuffle=W,f.sortBy=function(n,r,t){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(r=Z(r,t,3),h(n,function(n,t,e){i[++u]={f:r(n,t,e),g:u,h:n}}),o=i.length,i.sort(e);o--;)i[o]=i[o].h;return i},f.tap=function(n,r){return r(n),n
|
||||
},f.throttle=function(n,r,t){var e=true,u=true;if(!K(n))throw new TypeError;return false===t?e=false:L(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,U(n,r,t)},f.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);for(r=p(r,t,1);++e<n;)u[e]=r(e);return u},f.toArray=function(n){return ft(n)?O(n):n&&typeof n.length=="number"?$(n):Y(n)},f.union=function(){return b(y(arguments,true,true))},f.uniq=S,f.values=Y,f.where=C,f.without=function(n){return g(n,O(arguments,1))
|
||||
},f.wrap=function(n,r){return d(r,lr,null,null,[n])},f.zip=function(){for(var n=-1,r=I(it(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=it(arguments,n);return t},f.collect=$,f.drop=E,f.each=R,f.extend=V,f.methods=H,f.object=function(n,r){var t=-1,e=n?n.length:0,u={};for(r||!e||ft(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},f.select=F,f.tail=E,f.unique=S,f.clone=function(n){return L(n)?ft(n)?O(n):V({},n):n},f.contains=N,f.escape=function(n){return null==n?"":(n+"").replace(vr,u)
|
||||
},f.every=q,f.find=B,f.has=function(n,r){return n?Ur.call(n,r):false},f.identity=nr,f.indexOf=A,f.isArguments=x,f.isArray=ft,f.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Dr.call(n)==dr||false},f.isDate=function(n){return n&&typeof n=="object"&&Dr.call(n)==wr||false},f.isElement=function(n){return n&&1===n.nodeType||false},f.isEmpty=J,f.isEqual=function(n,r){return m(n,r)},f.isFinite=function(n){return Lr(n)&&!Qr(parseFloat(n))},f.isFunction=K,f.isNaN=function(n){return Q(n)&&n!=+n},f.isNull=function(n){return null===n
|
||||
},f.isNumber=Q,f.isObject=L,f.isRegExp=function(n){var r=typeof n;return n&&("function"==r||"object"==r)&&Dr.call(n)==Tr||false},f.isString=X,f.isUndefined=function(n){return typeof n=="undefined"},f.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Yr(0,e+t):Zr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},f.mixin=tr,f.noConflict=function(){return Nr._=Mr,this},f.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Cr(rt()*(r-n+1))},f.reduce=M,f.reduceRight=D,f.result=function(n,r){if(null!=n){var t=n[r];
|
||||
return K(t)?n[r]():t}},f.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:at(n).length},f.some=z,f.sortedIndex=k,f.template=function(n,r,t){var e=f,u=e.templateSettings;n=(n||"")+"",t=G({},t,u);var i=0,a="__p+='",u=t.variable;n.replace(RegExp((t.escape||yr).source+"|"+(t.interpolate||yr).source+"|"+(t.evaluate||yr).source+"|$","g"),function(r,t,e,u,f){return a+=n.slice(i,f).replace(mr,o),t&&(a+="'+_.escape("+t+")+'"),u&&(a+="';"+u+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),i=f+r.length,r
|
||||
}),a+="';",u||(u="obj",a="with("+u+"||{}){"+a+"}"),a="function("+u+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var l=Function("_","return "+a)(e)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},f.unescape=function(n){return null==n?"":(n+="",0>n.indexOf(";")?n:n.replace(hr,i))},f.uniqueId=function(n){var r=++gr+"";return n?n+r:r},f.all=q,f.any=z,f.detect=B,f.findWhere=function(n,r){return C(n,r,true)},f.foldl=M,f.foldr=D,f.include=N,f.inject=M,f.first=T,f.last=function(n,r,t){var e=0,u=n?n.length:0;
|
||||
if(typeof r!="number"&&null!=r){var o=u;for(r=Z(r,t,3);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[u-1]:ur;return e=u-e,O(n,0<e?e:0)},f.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=Y(n)),null==r||t?n?n[0+Cr(rt()*(n.length-1-0+1))]:ur:(n=W(n),n.length=Zr(Yr(0,r),n.length),n)},f.take=T,f.head=T,tr(V({},f)),f.VERSION="2.4.1",f.prototype.chain=function(){return this.__chain__=true,this},f.prototype.value=function(){return this.__wrapped__},h("pop push reverse shift sort splice unshift".split(" "),function(n){var r=$r[n];
|
||||
f.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),tt.spliceObjects||0!==n.length||delete n[0],this}}),h(["concat","join","slice"],function(n){var r=$r[n];f.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new a(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Nr._=f, define(function(){return f})):qr&&Fr?Rr?(Fr.exports=f)._=f:qr._=f:Nr._=f}).call(this);
|
||||
;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function r(n,r){var t;n:{t=n.f;var e=r.f;if(t!==e){if(t>e||typeof t=="undefined"){t=1;break n}if(t<e||typeof e=="undefined"){t=-1;break n}}t=0}return t||n.g-r.g}function t(n){return Tr[n]}function e(n){return"\\"+Or[n]}function u(n){return Ar[n]}function o(n){return n instanceof o?n:new i(n)}function i(n,r){this.__chain__=!!r,this.__wrapped__=n}function f(n){function r(){if(u){var n=A(u);Pr.apply(n,arguments)
|
||||
}if(this instanceof r){var o=a(t.prototype),n=t.apply(o,n||arguments);return J(n)?n:o}return t.apply(e,n||arguments)}var t=n[0],e=n[3],u=n[4];return r}function a(n){return J(n)?Gr(n):{}}function l(n,r,t){if(typeof n!="function")return Y;if(typeof r=="undefined"||!("prototype"in n))return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)
|
||||
}}return z(n,r)}function c(n){function r(){var n=l?o:this;if(i){var h=A(i);Pr.apply(h,arguments)}if(f||s){h||(h=A(arguments)),f&&Pr.apply(h,f);var y=arguments.length;if(s&&y<u)return e|=fr,e&=~ar,g||(e&=~(er|ur)),n=Qr(0,u-y),c([t,e,n,o,h])}return h||(h=arguments),p&&(t=n[v]),this instanceof r?(n=a(t.prototype),h=t.apply(n,h),J(h)?h:n):t.apply(n,h)}var t=n[0],e=n[1],u=n[2],o=n[3],i=n[4],f=n[5],l=e&er,p=e&ur,s=e&or,g=e&ir,v=t;return r}function p(n,r){for(var t=-1,e=_(),u=n?n.length:0,o=[];++t<u;){var i=n[t];
|
||||
0>e(r,i)&&o.push(i)}return o}function s(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(;++t<e&&r(n[t],t,n)!==cr;);else for(var t=-1,e=at(n),u=e.length;++t<u;){var o=e[t];if(r(n[o],o,n)===cr)break}return n}function g(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&r(n[t],t,n)!==cr;);else for(var t=at(n),e=t.length;e--;){var u=t[e];if(r(n[u],u,n)===cr)break}return n}function v(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(ft(i)||w(i))){r||(i=v(i,r,t));
|
||||
var f=-1,a=i.length,l=o.length;for(o.length+=a;++f<a;)o[l++]=i[f]}else t||o.push(i)}return o}function h(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;var u=typeof n,i=typeof r;if(n===n&&(!n||"function"!=u&&"object"!=u)&&(!r||"function"!=i&&"object"!=i))return false;if(null==n||null==r)return n===r;if(i=Ir.call(n),u=Ir.call(r),i!=u)return false;switch(i){case br:case _r:return+n==+r;case dr:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case jr:case xr:return n==r+""}if(u=i==mr,!u){var f=n instanceof o,a=r instanceof o;
|
||||
if(f||a)return h(f?n.__wrapped__:n,a?r.__wrapped__:r,t,e);if(i!=wr)return false;if(i=Cr.call(n,"constructor"),f=Cr.call(r,"constructor"),i!==f||!i&&(i=n.constructor,f=r.constructor,i!=f&&!(H(i)&&i instanceof i&&H(f)&&f instanceof f)&&"constructor"in n&&"constructor"in r))return false}for(t||(t=[]),e||(e=[]),i=t.length;i--;)if(t[i]==n)return e[i]==r;var l=true,c=0;if(t.push(n),e.push(r),u){if(c=r.length,l=c==n.length)for(;c--&&(l=h(n[c],r[c],t,e)););}else rt(r,function(r,u,o){return Cr.call(o,u)?(c++,!(l=Cr.call(n,u)&&h(n[u],r,t,e))&&cr):void 0
|
||||
}),l&&rt(n,function(n,r,t){return Cr.call(t,r)?!(l=-1<--c)&&cr:void 0});return t.pop(),e.pop(),l}function y(n,r,t){for(var e=-1,u=_(),o=n?n.length:0,i=[],f=t?[]:i;++e<o;){var a=n[e],l=t?t(a,e,n):a;(r?!e||f[f.length-1]!==l:0>u(f,l))&&(t&&f.push(l),i.push(a))}return i}function m(n){return function(r,t,e){var u={};t=X(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++e<o;){var i=r[e];n(u,i,t(i,e,r),r)}else s(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function b(n,r,t,e,u,o){var i=r&ur,a=r&fr,l=r&ar;
|
||||
if(!i&&!H(n))throw new TypeError;return a&&!u.length&&(r&=~fr,u=false),l&&!o.length&&(r&=~ar,o=false),null==t?t=i?0:n.length:0>t&&(t=0),n=[n,r,t,e,u,o],r==er||r==(er|fr)?f(n):c(n)}function _(){var r=(r=o.indexOf)===x?n:r;return r}function d(n){return typeof n=="function"&&Mr.test(zr.call(n))}function w(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ir.call(n)==yr||false}function j(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=-1;for(r=X(r,t,3);++o<u&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[0]:tr;
|
||||
return A(n,0,0<e?e:0)}function x(r,t,e){var u=r?r.length:0;if(typeof e=="number")e=0>e?Qr(0,u+e):e||0;else if(e)return e=E(r,t),u&&r[e]===t?e:-1;return n(r,t,e)}function T(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,o=n?n.length:0;for(r=X(r,t,3);++u<o&&r(n[u],u,n);)e++}else e=null==r||t?1:0<r?r:0;return A(n,e)}function A(n,r,t){var e=-1,u=n?n.length:0;for(typeof r=="undefined"?r=0:0>r?r=Qr(u+r,0):r>u&&(r=u),typeof t=="undefined"?t=u:0>t?t=Qr(u+t,0):t>u&&(t=u),u=t-r||0,t=Array(u);++e<u;)t[e]=n[r+e];
|
||||
return t}function E(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?X(t,e,1):Y,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function O(n,r,t,e){var u=typeof r;return"boolean"!=u&&null!=r&&(e=t,t=r,r=false,"number"!=u&&"string"!=u||!e||e[t]!==n||(t=null)),null!=t&&(t=X(t,e,3)),y(n,r,t)}function S(n,r){var t=_(),e=n?n.length:0,u=false;return e&&typeof e=="number"?u=-1<t(n,r):s(n,function(n){return(u=n===r)&&cr}),u}function k(n,r,t){var e=true;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else s(n,function(n,t,u){return!(e=!!r(n,t,u))&&cr
|
||||
});return e}function N(n,r,t){var e=[];r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else s(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function q(n,r,t){r=X(r,t,3),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return s(n,function(n,t,e){return r(n,t,e)?(u=n,cr):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o}}function F(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:l(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==cr;);else s(n,r)
|
||||
}function B(n,r,t){var e=-1,u=n?n.length:0;if(r=X(r,t,3),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],s(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function R(n,r,t){var e=-1/0,u=e,o=typeof r;"number"!=o&&"string"!=o||!t||t[r]!==n||(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t>u&&(u=t);else r=X(r,t,3),s(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function $(n,r,t,e){var u=3>arguments.length;r=X(r,e,4);var o=-1,i=n?n.length:0;
|
||||
if(typeof i=="number")for(u&&i&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else s(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)});return t}function I(n,r,t,e){var u=3>arguments.length;return r=X(r,e,4),g(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function M(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return s(n,function(n){var t;t=++r,t=0+Wr(Zr()*(t-0+1)),e[r]=e[t],e[t]=n}),e}function D(n,r,t){var e;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else s(n,function(n,t,u){return(e=r(n,t,u))&&cr
|
||||
});return!!e}function W(n,r,t){return t&&G(r)?tr:(t?q:N)(n,r)}function z(n,r){if(3>arguments.length)return b(n,er,null,r);var t=n&&(n[lr]?n[lr][2]:n.length),e=A(arguments,2),t=t-e.length;return b(n,er|fr,t,r,e)}function C(n,r,t){var e,u,o,i,f,a,l,c=0,p=false,s=true;if(!H(n))throw new TypeError;if(r=Qr(0,r)||0,true===t)var g=true,s=false;else J(t)&&(g=t.leading,p="maxWait"in t&&(Qr(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var v=function(){var t=r-(lt()-i);0<t?a=setTimeout(v,t):(u&&clearTimeout(u),t=l,u=a=l=tr,t&&(c=lt(),o=n.apply(f,e),a||u||(e=f=null)))
|
||||
},h=function(){a&&clearTimeout(a),u=a=l=tr,(s||p!==r)&&(c=lt(),o=n.apply(f,e),a||u||(e=f=null))};return function(){if(e=arguments,i=lt(),f=this,l=s&&(a||!g),false===p)var t=g&&!a;else{u||g||(c=i);var y=p-(i-c),m=0>=y;m?(u&&(u=clearTimeout(u)),c=i,o=n.apply(f,e)):u||(u=setTimeout(h,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(v,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function P(n,r,t){if(!n)return n;var e=arguments,u=0,o=e.length,i=typeof t;for("number"!=i&&"string"!=i||!e[3]||e[3][t]!==r||(o=2);++u<o;)if(r=e[u])for(var f in r)n[f]=r[f];
|
||||
return n}function U(n,r,t){if(!n)return n;var e=arguments,u=0,o=e.length,i=typeof t;for("number"!=i&&"string"!=i||!e[3]||e[3][t]!==r||(o=2);++u<o;)if(r=e[u])for(var f in r)"undefined"==typeof n[f]&&(n[f]=r[f]);return n}function V(n){var r=[];return rt(n,function(n,t){H(n)&&r.push(t)}),r.sort()}function G(n){if(!n)return true;if(ft(n)||L(n))return!n.length;for(var r in n)if(Cr.call(n,r))return false;return true}function H(n){return typeof n=="function"}function J(n){var r=typeof n;return n&&("function"==r||"object"==r)||false
|
||||
}function K(n){var r=typeof n;return"number"==r||n&&"object"==r&&Ir.call(n)==dr||false}function L(n){return typeof n=="string"||n&&typeof n=="object"&&Ir.call(n)==xr||false}function Q(n){for(var r=-1,t=at(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function X(n,r,t){var e=typeof n;return null==n||"function"==e?l(n,r,t):"object"!=e?rr(n):Z(n)}function Y(n){return n}function Z(n){n||(n={});var r=at(n);return function(t){for(var e=r.length,u=false;e--&&(u=r[e],u=Cr.call(t,u)&&t[u]===n[u]););return u
|
||||
}}function nr(n){for(var r=-1,t=V(n),e=t.length;++r<e;){var u=t[r];o.prototype[u]=function(){var r=o[u]=n[u];return function(){var n=[this.__wrapped__];return Pr.apply(n,arguments),n=r.apply(o,n),this.__chain__?new i(n,true):n}}()}}function rr(n){return function(r){return r[n]}}var tr,er=1,ur=2,or=4,ir=8,fr=16,ar=32,lr="__lodash@2.4.1__",cr=lr+"breaker__",pr=0,sr=/&(?:amp|lt|gt|quot|#x27);/g,gr=/[&<>"']/g,vr=/($^)/,hr=/['\n\r\t\u2028\u2029\\]/g,yr="[object Arguments]",mr="[object Array]",br="[object Boolean]",_r="[object Date]",dr="[object Number]",wr="[object Object]",jr="[object RegExp]",xr="[object String]",Tr={"&":"&","<":"<",">":">",'"':""","'":"'"},Ar={"&":"&","<":"<",">":">",""":'"',"'":"'"},Er={"function":true,object:true},Or={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Sr=Er[typeof window]&&window||this,kr=Er[typeof exports]&&exports&&!exports.nodeType&&exports,Nr=Er[typeof module]&&module&&!module.nodeType&&module,qr=kr&&Nr&&typeof global=="object"&&global;
|
||||
!qr||qr.global!==qr&&qr.window!==qr&&qr.self!==qr||(Sr=qr);var Fr=Nr&&Nr.exports===kr&&kr,Br=Array.prototype,Rr=Object.prototype,$r=Sr._,Ir=Rr.toString,Mr=RegExp("^"+(Ir+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dr=Math.ceil,Wr=Math.floor,zr=Function.prototype.toString,Cr=Rr.hasOwnProperty,Pr=Br.push,Ur=Rr.propertyIsEnumerable,Vr=Br.splice,Gr=d(Gr=Object.create)&&Gr,Hr=d(Hr=Array.isArray)&&Hr,Jr=Sr.isFinite,Kr=Sr.isNaN,Lr=d(Lr=Object.keys)&&Lr,Qr=Math.max,Xr=Math.min,Yr=d(Yr=Date.now)&&Yr,Zr=Math.random;
|
||||
i.prototype=o.prototype;var nt={};!function(){var n={0:1,length:1};nt.spliceObjects=(Vr.call(n,0,1),!n[0])}(1),o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Gr||(a=function(){function n(){}return function(r){if(J(r)){n.prototype=r;var t=new n;n.prototype=null}return t||Sr.Object()}}()),w(arguments)||(w=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Cr.call(n,"callee")&&!Ur.call(n,"callee")||false});var rt=function(n,r){if(!J(n))return n;
|
||||
for(var t in n)if(r(n[t],t,n)===cr)break;return n},tt=function(n){var r=[];if(!J(n))return r;for(var t in n)Cr.call(n,t)&&r.push(t);return r},et=m(function(n,r,t){Cr.call(n,t)?n[t]++:n[t]=1}),ut=m(function(n,r,t){Cr.call(n,t)?n[t].push(r):n[t]=[r]}),ot=m(function(n,r,t){n[t]=r}),it=B,ft=Hr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ir.call(n)==mr||false};H(/x/)&&(H=function(n){return typeof n=="function"&&"[object Function]"==Ir.call(n)});var at=Lr?function(n){return J(n)?Lr(n):[]
|
||||
}:tt,lt=Yr||function(){return(new Date).getTime()};o.after=function(n,r){if(!H(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},o.bind=z,o.bindAll=function(n){for(var r=1<arguments.length?v(arguments,true,false,1):V(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=b(n[u],er,null,n)}return n},o.chain=function(n){return n=new i(n),n.__chain__=true,n},o.compact=function(n){for(var r=-1,t=n?n.length:0,e=0,u=[];++r<t;){var o=n[r];o&&(u[e++]=o)}return u},o.compose=function(){for(var n=arguments,r=n.length,t=r;t--;)if(!H(n[t]))throw new TypeError;
|
||||
return function(){for(var t=r-1,e=n[t].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},o.countBy=et,o.debounce=C,o.defaults=U,o.defer=function(n){if(!H(n))throw new TypeError;var r=A(arguments,1);return setTimeout(function(){n.apply(tr,r)},1)},o.delay=function(n,r){if(!H(n))throw new TypeError;var t=A(arguments,2);return setTimeout(function(){n.apply(tr,t)},r)},o.difference=function(n){return p(n,v(arguments,true,true,1))},o.filter=N,o.flatten=function(n,r,t){var e=typeof r;return"number"!=e&&"string"!=e||!t||t[r]!==n||(r=false),v(n,r)
|
||||
},o.forEach=F,o.functions=V,o.groupBy=ut,o.indexBy=ot,o.initial=function(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=u;for(r=X(r,t,3);o--&&r(n[o],o,n);)e++}else e=null==r||t?1:r||e;return e=u-e,A(n,0,0<e?e:0)},o.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];(ft(e)||w(e))&&n.push(e)}var u=n[0],o=-1,i=_(),f=u?u.length:0,a=[];n:for(;++o<f;)if(e=u[o],0>i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},o.invert=function(n){for(var r=-1,t=at(n),e=t.length,u={};++r<e;){var o=t[r];
|
||||
u[n[o]]=o}return u},o.invoke=function(n,r){var t=-1,e=typeof r=="function",u=n?n.length:0,o=Array(typeof u=="number"?u:0);if(3>arguments.length&&typeof u=="number")for(;++t<u;){var i=n[t];o[t]=e?r.call(i):i[r]()}else{var f=A(arguments,2);s(n,function(n){o[++t]=(e?r:n[r]).apply(n,f)})}return o},o.keys=at,o.map=B,o.max=R,o.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):"_"+arguments[0];return Cr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},o.min=function(n,r,t){var e=1/0,u=e,o=typeof r;
|
||||
"number"!=o&&"string"!=o||!t||t[r]!==n||(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);else r=X(r,t,3),s(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},o.omit=function(n){var r=[];rt(n,function(n,t){r.push(t)});for(var r=p(r,v(arguments,true,false,1)),t=-1,e=r.length,u={};++t<e;){var o=r[t];u[o]=n[o]}return u},o.once=function(n){var r,t;if(!H(n))throw new TypeError;return function(){return r?t:(r=true,t=n.apply(this,arguments),n=null,t)}},o.pairs=function(n){for(var r=-1,t=at(n),e=t.length,u=Array(e);++r<e;){var o=t[r];
|
||||
u[r]=[o,n[o]]}return u},o.partial=function(n){var r=n&&(n[lr]?n[lr][2]:n.length),t=A(arguments,1),r=r-t.length;return b(n,fr,r,null,t)},o.pick=function(n){for(var r=-1,t=v(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},o.pluck=it,o.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Qr(0,Dr((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},o.reject=function(n,r,t){return r=X(r,t,3),N(n,function(n,t,e){return!r(n,t,e)})},o.rest=T,o.shuffle=M,o.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);
|
||||
for(t=X(t,e,3),s(n,function(n,r,e){i[++u]={f:t(n,r,e),g:u,h:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].h;return i},o.tap=function(n,r){return r(n),n},o.throttle=function(n,r,t){var e=true,u=true;if(!H(n))throw new TypeError;return false===t?e=false:J(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,C(n,r,t)},o.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);for(r=l(r,t,1);++e<n;)u[e]=r(e);return u},o.toArray=function(n){return ft(n)?A(n):n&&typeof n.length=="number"?B(n):Q(n)
|
||||
},o.union=function(){return y(v(arguments,true,true))},o.uniq=O,o.values=Q,o.where=W,o.without=function(n){return p(n,A(arguments,1))},o.wrap=function(n,r){return b(r,fr,null,null,[n])},o.zip=function(){for(var n=-1,r=R(it(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=it(arguments,n);return t},o.collect=B,o.drop=T,o.each=F,o.extend=P,o.methods=V,o.object=function(n,r){var t=-1,e=n?n.length:0,u={};for(r||!e||ft(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},o.select=N,o.tail=T,o.unique=O,o.clone=function(n){return J(n)?ft(n)?A(n):P({},n):n
|
||||
},o.contains=S,o.escape=function(n){return null==n?"":(n+"").replace(gr,t)},o.every=k,o.find=q,o.has=function(n,r){return n?Cr.call(n,r):false},o.identity=Y,o.indexOf=x,o.isArguments=w,o.isArray=ft,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Ir.call(n)==br||false},o.isDate=function(n){return n&&typeof n=="object"&&Ir.call(n)==_r||false},o.isElement=function(n){return n&&1===n.nodeType||false},o.isEmpty=G,o.isEqual=function(n,r){return h(n,r)},o.isFinite=function(n){return Jr(n)&&!Kr(parseFloat(n))
|
||||
},o.isFunction=H,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=J,o.isRegExp=function(n){var r=typeof n;return n&&("function"==r||"object"==r)&&Ir.call(n)==jr||false},o.isString=L,o.isUndefined=function(n){return typeof n=="undefined"},o.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Qr(0,e+t):Xr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},o.mixin=nr,o.noConflict=function(){return Sr._=$r,this},o.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Wr(Zr()*(r-n+1))
|
||||
},o.reduce=$,o.reduceRight=I,o.result=function(n,r){if(null!=n){var t=n[r];return H(t)?n[r]():t}},o.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:at(n).length},o.some=D,o.sortedIndex=E,o.template=function(n,r,t){var u=o,i=u.templateSettings;n=(n||"")+"",t=U({},t,i);var f=0,a="__p+='",i=t.variable;n.replace(RegExp((t.escape||vr).source+"|"+(t.interpolate||vr).source+"|"+(t.evaluate||vr).source+"|$","g"),function(r,t,u,o,i){return a+=n.slice(f,i).replace(hr,e),t&&(a+="'+_.escape("+t+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r
|
||||
}),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var l=Function("_","return "+a)(u)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},o.unescape=function(n){return null==n?"":(n+="",0>n.indexOf(";")?n:n.replace(sr,u))},o.uniqueId=function(n){var r=++pr+"";return n?n+r:r},o.all=k,o.any=D,o.detect=q,o.findWhere=function(n,r){return W(n,r,true)},o.foldl=$,o.foldr=I,o.include=S,o.inject=$,o.first=j,o.last=function(n,r,t){var e=0,u=n?n.length:0;
|
||||
if(typeof r!="number"&&null!=r){var o=u;for(r=X(r,t,3);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[u-1]:tr;return e=u-e,A(n,0<e?e:0)},o.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=Q(n)),null==r||t?n?n[0+Wr(Zr()*(n.length-1-0+1))]:tr:(n=M(n),n.length=Xr(Qr(0,r),n.length),n)},o.take=j,o.head=j,nr(P({},o)),o.VERSION="2.4.1",o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.value=function(){return this.__wrapped__},s("pop push reverse shift sort splice unshift".split(" "),function(n){var r=Br[n];
|
||||
o.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),nt.spliceObjects||0!==n.length||delete n[0],this}}),s(["concat","join","slice"],function(n){var r=Br[n];o.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Sr._=o, define(function(){return o})):kr&&Nr?Fr?(Nr.exports=o)._=o:kr._=o:Sr._=o}).call(this);
|
||||
178
doc/README.md
178
doc/README.md
@@ -1765,7 +1765,7 @@ _.invoke([123, 456], String.prototype.split, '');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mapcollection-callbackidentity-thisarg"></a>`_.map(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_mapcollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L3929 "View in source") [Ⓣ][1]
|
||||
<a href="#_mapcollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L3936 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of values by running each element in the collection through the callback. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1810,7 +1810,7 @@ _.map(characters, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_maxcollection-callbackidentity-thisarg"></a>`_.max(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_maxcollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L3987 "View in source") [Ⓣ][1]
|
||||
<a href="#_maxcollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L3994 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the maximum value of a collection. If the collection is empty or falsey `-Infinity` is returned. If a callback is provided it will be executed for each value in the collection to generate the criterion by which the value is ranked. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1852,7 +1852,7 @@ _.max(characters, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mincollection-callbackidentity-thisarg"></a>`_.min(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_mincollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4063 "View in source") [Ⓣ][1]
|
||||
<a href="#_mincollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4070 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the minimum value of a collection. If the collection is empty or falsey `Infinity` is returned. If a callback is provided it will be executed for each value in the collection to generate the criterion by which the value is ranked. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1894,7 +1894,7 @@ _.min(characters, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pluckcollection-key"></a>`_.pluck(collection, key)`
|
||||
<a href="#_pluckcollection-key">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4119 "View in source") [Ⓣ][1]
|
||||
<a href="#_pluckcollection-key">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4126 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the value of a specified property from all elements in the collection.
|
||||
|
||||
@@ -1924,7 +1924,7 @@ _.pluck(characters, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducecollection-callbackidentity-accumulator-thisarg"></a>`_.reduce(collection, [callback=identity], [accumulator], [thisArg])`
|
||||
<a href="#_reducecollection-callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4151 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducecollection-callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4158 "View in source") [Ⓣ][1]
|
||||
|
||||
Reduces a collection to a value which is the accumulated result of running each element in the collection through the callback, where each successive callback execution consumes the return value of the previous execution. If `accumulator` is not provided the first element of the collection will be used as the initial `accumulator` value. The callback is bound to `thisArg` and invoked with four arguments; *(accumulator, value, index|key, collection)*.
|
||||
|
||||
@@ -1962,7 +1962,7 @@ var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducerightcollection-callbackidentity-accumulator-thisarg"></a>`_.reduceRight(collection, [callback=identity], [accumulator], [thisArg])`
|
||||
<a href="#_reducerightcollection-callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4194 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducerightcollection-callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4201 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.reduce` except that it iterates over elements of a `collection` from right to left.
|
||||
|
||||
@@ -1993,7 +1993,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rejectcollection-callbackidentity-thisarg"></a>`_.reject(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_rejectcollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4244 "View in source") [Ⓣ][1]
|
||||
<a href="#_rejectcollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4251 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.filter`; this method returns the elements of a collection that the callback does **not** return truey for.
|
||||
|
||||
@@ -2036,7 +2036,7 @@ _.reject(characters, { 'age': 36 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_samplecollection-n"></a>`_.sample(collection, [n])`
|
||||
<a href="#_samplecollection-n">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4270 "View in source") [Ⓣ][1]
|
||||
<a href="#_samplecollection-n">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4277 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves a random element or `n` random elements from a collection.
|
||||
|
||||
@@ -2064,7 +2064,7 @@ _.sample([1, 2, 3, 4], 2);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4298 "View in source") [Ⓣ][1]
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4305 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. See [Wikipedia](http://en.wikipedia.org/wiki/Fisher-Yates_shuffle) for more details.
|
||||
|
||||
@@ -2088,7 +2088,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sizecollection"></a>`_.size(collection)`
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4332 "View in source") [Ⓣ][1]
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4339 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
|
||||
|
||||
@@ -2118,7 +2118,7 @@ _.size('pebbles');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_somecollection-callbackidentity-thisarg"></a>`_.some(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_somecollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4379 "View in source") [Ⓣ][1]
|
||||
<a href="#_somecollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4386 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the callback returns a truey value for **any** element of a collection. The function returns as soon as it finds a passing value and does not iterate over the entire collection. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -2164,7 +2164,7 @@ _.some(characters, { 'age': 1 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortbycollection-callbackidentity-thisarg"></a>`_.sortBy(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_sortbycollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4449 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortbycollection-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4456 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements, sorted in ascending order by the results of running each element in a collection through the callback. This method performs a stable sort, that is, it will preserve the original sort order of equal elements. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -2214,7 +2214,7 @@ _.map(_.sortBy(characters, ['name', 'age']), _.values);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_toarraycollection"></a>`_.toArray(collection)`
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4498 "View in source") [Ⓣ][1]
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4505 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the `collection` to an array.
|
||||
|
||||
@@ -2238,7 +2238,7 @@ Converts the `collection` to an array.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wherecollection-props"></a>`_.where(collection, props)`
|
||||
<a href="#_wherecollection-props">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4532 "View in source") [Ⓣ][1]
|
||||
<a href="#_wherecollection-props">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4539 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison between each element in `collection` and the `props` object, returning an array of all elements that have equivalent property values.
|
||||
|
||||
@@ -2278,7 +2278,7 @@ _.where(characters, { 'pets': ['dino'] });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4560 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4567 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that executes `func`, with the `this` binding and arguments of the created function, only after being called `n` times.
|
||||
|
||||
@@ -2311,7 +2311,7 @@ _.forEach(saves, function(type) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindfunc-thisarg-args"></a>`_.bind(func, [thisArg], [args])`
|
||||
<a href="#_bindfunc-thisarg-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4596 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc-thisarg-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4603 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those provided to the bound function.
|
||||
|
||||
@@ -2344,7 +2344,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindallobject-methodname"></a>`_.bindAll(object, [methodName])`
|
||||
<a href="#_bindallobject-methodname">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4633 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject-methodname">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4640 "View in source") [Ⓣ][1]
|
||||
|
||||
Binds methods of an object to the object itself, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided all the function properties of `object` will be bound.
|
||||
|
||||
@@ -2377,7 +2377,7 @@ jQuery('#docs').on('click', view.onClick);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindkeyobject-key-args"></a>`_.bindKey(object, key, [args])`
|
||||
<a href="#_bindkeyobject-key-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4680 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindkeyobject-key-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4687 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those provided to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See [Peter Michaux's article](http://michaux.ca/articles/lazy-function-definition-pattern) for more details.
|
||||
|
||||
@@ -2418,7 +2418,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_composefunc"></a>`_.compose([func])`
|
||||
<a href="#_composefunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4716 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4723 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is the composition of the provided functions, where each function consumes the return value of the function that follows. For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function.
|
||||
|
||||
@@ -2456,7 +2456,7 @@ welcome('pebbles');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_curryfunc"></a>`_.curry(func)`
|
||||
<a href="#_curryfunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4767 "View in source") [Ⓣ][1]
|
||||
<a href="#_curryfunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4774 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function which accepts one or more arguments of `func` that when invoked either executes `func` returning its result, if all `func` arguments have been provided, or returns a function that accepts one or more of the remaining `func` arguments, and so on. The arity of `func` can be specified if `func.length` is not sufficient.
|
||||
|
||||
@@ -2493,7 +2493,7 @@ curried(1, 2, 3);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-options"></a>`_.debounce(func, wait, [options])`
|
||||
<a href="#_debouncefunc-wait-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4813 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4820 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Provide an options object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -2537,7 +2537,7 @@ source.addEventListener('message', _.debounce(batchLog, 250, {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_deferfunc-args"></a>`_.defer(func, [args])`
|
||||
<a href="#_deferfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4929 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4936 "View in source") [Ⓣ][1]
|
||||
|
||||
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be provided to `func` when it is invoked.
|
||||
|
||||
@@ -2562,7 +2562,7 @@ _.defer(function(text) { console.log(text); }, 'deferred');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_delayfunc-wait-args"></a>`_.delay(func, wait, [args])`
|
||||
<a href="#_delayfunc-wait-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4953 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4960 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be provided to `func` when it is invoked.
|
||||
|
||||
@@ -2588,7 +2588,7 @@ _.delay(function(text) { console.log(text); }, 1000, 'later');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_memoizefunc-resolver"></a>`_.memoize(func, [resolver])`
|
||||
<a href="#_memoizefunc-resolver">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L4998 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc-resolver">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5005 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that memoizes the result of `func`. If `resolver` is provided it will be used to determine the cache key for storing the result based on the arguments provided to the memoized function. By default, the first argument provided to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function. The result cache is exposed as the `cache` property on the memoized function.
|
||||
|
||||
@@ -2631,7 +2631,7 @@ get('pebbles');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_oncefunc"></a>`_.once(func)`
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5031 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5038 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2657,7 +2657,7 @@ initialize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialfunc-args"></a>`_.partial(func, [args])`
|
||||
<a href="#_partialfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5072 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5079 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those provided to the new function. This method is similar to `_.bind` except it does **not** alter the `this` binding.
|
||||
|
||||
@@ -2686,7 +2686,7 @@ hi('fred');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialrightfunc-args"></a>`_.partialRight(func, [args])`
|
||||
<a href="#_partialrightfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5110 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialrightfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5117 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.partial` except that `partial` arguments are appended to those provided to the new function.
|
||||
|
||||
@@ -2725,7 +2725,7 @@ options.imports
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait-options"></a>`_.throttle(func, wait, [options])`
|
||||
<a href="#_throttlefunc-wait-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5149 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5156 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. Provide an options object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
@@ -2761,7 +2761,7 @@ jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5190 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5197 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that provides `value` to the wrapper function as its first argument. Additional arguments provided to the function are appended to those provided to the wrapper function. The wrapper is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2797,7 +2797,7 @@ p('fred, barney, & pebbles');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_assignobject-source-callback-thisarg"></a>`_.assign(object, [source], [callback], [thisArg])`
|
||||
<a href="#_assignobject-source-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5226 "View in source") [Ⓣ][1]
|
||||
<a href="#_assignobject-source-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5233 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object. Subsequent sources will overwrite property assignments of previous sources. If a callback is provided it will be executed to produce the assigned values. The callback is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -2835,7 +2835,7 @@ defaults(object, { 'name': 'fred', 'employer': 'slate' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonevalue-isdeepfalse-callback-thisarg"></a>`_.clone(value, [isDeep=false], [callback], [thisArg])`
|
||||
<a href="#_clonevalue-isdeepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5305 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonevalue-isdeepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5312 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a clone of `value`. If `isDeep` is `true` nested objects will also be cloned, otherwise they will be assigned by reference. If a callback is provided it will be executed to produce the cloned values. If the callback returns `undefined` cloning will be handled by the method instead. The callback is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2884,7 +2884,7 @@ clone.childNodes.length;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonedeepvalue-callback-thisarg"></a>`_.cloneDeep(value, [callback], [thisArg])`
|
||||
<a href="#_clonedeepvalue-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5365 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonedeepvalue-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5372 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a deep clone of `value`. If a callback is provided it will be executed to produce the cloned values. If the callback returns `undefined` cloning will be handled by the method instead. The callback is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2930,7 +2930,7 @@ clone.node == view.node;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_createprototype-properties"></a>`_.create(prototype, [properties])`
|
||||
<a href="#_createprototype-properties">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5400 "View in source") [Ⓣ][1]
|
||||
<a href="#_createprototype-properties">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5407 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object that inherits from the given `prototype` object. If a `properties` object is provided its own enumerable properties are assigned to the created object.
|
||||
|
||||
@@ -2970,7 +2970,7 @@ circle instanceof Shape;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_defaultsobject-source"></a>`_.defaults(object, [source])`
|
||||
<a href="#_defaultsobject-source">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5424 "View in source") [Ⓣ][1]
|
||||
<a href="#_defaultsobject-source">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5431 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object for all destination properties that resolve to `undefined`. Once a property is set, additional defaults of the same property will be ignored.
|
||||
|
||||
@@ -2996,7 +2996,7 @@ _.defaults(object, { 'name': 'fred', 'employer': 'slate' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findkeyobject-callbackidentity-thisarg"></a>`_.findKey(object, [callback=identity], [thisArg])`
|
||||
<a href="#_findkeyobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5494 "View in source") [Ⓣ][1]
|
||||
<a href="#_findkeyobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5501 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.findIndex` except that it returns the key of the first element that passes the callback check, instead of the element itself.
|
||||
|
||||
@@ -3042,7 +3042,7 @@ _.findKey(characters, 'blocked');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findlastkeyobject-callbackidentity-thisarg"></a>`_.findLastKey(object, [callback=identity], [thisArg])`
|
||||
<a href="#_findlastkeyobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5548 "View in source") [Ⓣ][1]
|
||||
<a href="#_findlastkeyobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5555 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.findKey` except that it iterates over elements of a `collection` in the opposite order.
|
||||
|
||||
@@ -3088,7 +3088,7 @@ _.findLastKey(characters, 'blocked');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forinobject-callbackidentity-thisarg"></a>`_.forIn(object, [callback=identity], [thisArg])`
|
||||
<a href="#_forinobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5592 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5599 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over own and inherited enumerable properties of an object, executing the callback for each property. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -3126,7 +3126,7 @@ _.forIn(new Shape, function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forinrightobject-callbackidentity-thisarg"></a>`_.forInRight(object, [callback=identity], [thisArg])`
|
||||
<a href="#_forinrightobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5625 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinrightobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5632 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.forIn` except that it iterates over elements of a `collection` in the opposite order.
|
||||
|
||||
@@ -3164,7 +3164,7 @@ _.forInRight(new Shape, function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forownobject-callbackidentity-thisarg"></a>`_.forOwn(object, [callback=identity], [thisArg])`
|
||||
<a href="#_forownobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5661 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5668 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over own enumerable properties of an object, executing the callback for each property. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -3192,7 +3192,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forownrightobject-callbackidentity-thisarg"></a>`_.forOwnRight(object, [callback=identity], [thisArg])`
|
||||
<a href="#_forownrightobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5684 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownrightobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5691 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.forOwn` except that it iterates over elements of a `collection` in the opposite order.
|
||||
|
||||
@@ -3220,7 +3220,7 @@ _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_functionsobject"></a>`_.functions(object)`
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5713 "View in source") [Ⓣ][1]
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5720 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a sorted array of property names of all enumerable properties, own and inherited, of `object` that have function values.
|
||||
|
||||
@@ -3247,7 +3247,7 @@ _.functions(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_hasobject-key"></a>`_.has(object, key)`
|
||||
<a href="#_hasobject-key">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5738 "View in source") [Ⓣ][1]
|
||||
<a href="#_hasobject-key">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5745 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the specified property name exists as a direct property of `object`, instead of an inherited property.
|
||||
|
||||
@@ -3272,7 +3272,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invertobject-multivaluefalse"></a>`_.invert(object, [multiValue=false])`
|
||||
<a href="#_invertobject-multivaluefalse">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5767 "View in source") [Ⓣ][1]
|
||||
<a href="#_invertobject-multivaluefalse">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5774 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of the inverted keys and values of the given object. If the given object contains duplicate values, subsequent values will overwrite property assignments of previous values unless `multiValue` is `true`.
|
||||
|
||||
@@ -3332,7 +3332,7 @@ _.isArguments([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5808 "View in source") [Ⓣ][1]
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5815 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an array.
|
||||
|
||||
@@ -3359,7 +3359,7 @@ _.isArray([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5826 "View in source") [Ⓣ][1]
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5833 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a boolean value.
|
||||
|
||||
@@ -3383,7 +3383,7 @@ _.isBoolean(null);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5844 "View in source") [Ⓣ][1]
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5851 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a date.
|
||||
|
||||
@@ -3407,7 +3407,7 @@ _.isDate(new Date);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5861 "View in source") [Ⓣ][1]
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5868 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a DOM element.
|
||||
|
||||
@@ -3431,7 +3431,7 @@ _.isElement(document.body);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5894 "View in source") [Ⓣ][1]
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5901 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty".
|
||||
|
||||
@@ -3461,7 +3461,7 @@ _.isEmpty('');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isequala-b-callback-thisarg"></a>`_.isEqual(a, b, [callback], [thisArg])`
|
||||
<a href="#_isequala-b-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5951 "View in source") [Ⓣ][1]
|
||||
<a href="#_isequala-b-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5958 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison between two values to determine if they are equivalent to each other. If a callback is provided it will be executed to compare values. If the callback returns `undefined` comparisons will be handled by the method instead. The callback is bound to `thisArg` and invoked with two arguments; *(a, b)*.
|
||||
|
||||
@@ -3506,7 +3506,7 @@ _.isEqual(words, otherWords, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5984 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L5991 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is, or can be coerced to, a finite number.
|
||||
|
||||
@@ -3544,7 +3544,7 @@ _.isFinite(Infinity);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6001 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6008 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a function.
|
||||
|
||||
@@ -3568,7 +3568,7 @@ _.isFunction(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6066 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6073 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `NaN`.
|
||||
|
||||
@@ -3603,7 +3603,7 @@ _.isNaN(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6088 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6095 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `null`.
|
||||
|
||||
@@ -3630,7 +3630,7 @@ _.isNull(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6108 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6115 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a number.
|
||||
|
||||
@@ -3656,7 +3656,7 @@ _.isNumber(8.4 * 5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isobjectvalue"></a>`_.isObject(value)`
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6031 "View in source") [Ⓣ][1]
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6038 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
|
||||
|
||||
@@ -3686,7 +3686,7 @@ _.isObject(1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6138 "View in source") [Ⓣ][1]
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6145 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an object created by the `Object` constructor.
|
||||
|
||||
@@ -3721,7 +3721,7 @@ _.isPlainObject({ 'x': 0, 'y': 0 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6163 "View in source") [Ⓣ][1]
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6170 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a regular expression.
|
||||
|
||||
@@ -3745,7 +3745,7 @@ _.isRegExp(/fred/);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isstringvalue"></a>`_.isString(value)`
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6182 "View in source") [Ⓣ][1]
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6189 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a string.
|
||||
|
||||
@@ -3769,7 +3769,7 @@ _.isString('fred');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6200 "View in source") [Ⓣ][1]
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6207 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `undefined`.
|
||||
|
||||
@@ -3793,7 +3793,7 @@ _.isUndefined(void 0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_keysobject"></a>`_.keys(object)`
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6217 "View in source") [Ⓣ][1]
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6224 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property names of an object.
|
||||
|
||||
@@ -3817,7 +3817,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mapvaluesobject-callbackidentity-thisarg"></a>`_.mapValues(object, [callback=identity], [thisArg])`
|
||||
<a href="#_mapvaluesobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6264 "View in source") [Ⓣ][1]
|
||||
<a href="#_mapvaluesobject-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6271 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object with the same keys as `object` and values generated by running each own enumerable property of `object` through the callback. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3856,7 +3856,7 @@ _.mapValues(characters, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mergeobject-source-callback-thisarg"></a>`_.merge(object, [source], [callback], [thisArg])`
|
||||
<a href="#_mergeobject-source-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6325 "View in source") [Ⓣ][1]
|
||||
<a href="#_mergeobject-source-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6332 "View in source") [Ⓣ][1]
|
||||
|
||||
Recursively merges own enumerable properties of the source object(s), that don't resolve to `undefined` into the destination object. Subsequent sources will overwrite property assignments of previous sources. If a callback is provided it will be executed to produce the merged values of the destination and source properties. If the callback returns `undefined` merging will be handled by the method instead. The callback is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -3912,7 +3912,7 @@ _.merge(food, otherFood, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_omitobject-callback-thisarg"></a>`_.omit(object, [callback], [thisArg])`
|
||||
<a href="#_omitobject-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6383 "View in source") [Ⓣ][1]
|
||||
<a href="#_omitobject-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6390 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of `object` omitting the properties the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3943,7 +3943,7 @@ _.omit({ 'name': 'fred', 'age': 40 }, function(value) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pairsobject"></a>`_.pairs(object)`
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6424 "View in source") [Ⓣ][1]
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6431 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a two dimensional array of an object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
|
||||
|
||||
@@ -3967,7 +3967,7 @@ _.pairs({ 'barney': 36, 'fred': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pickobject-callback-thisarg"></a>`_.pick(object, [callback], [thisArg])`
|
||||
<a href="#_pickobject-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6464 "View in source") [Ⓣ][1]
|
||||
<a href="#_pickobject-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6471 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of `object` picking the properties the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3998,7 +3998,7 @@ _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_transformobject-callbackidentity-accumulator-thisarg"></a>`_.transform(object, [callback=identity], [accumulator], [thisArg])`
|
||||
<a href="#_transformobject-callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6519 "View in source") [Ⓣ][1]
|
||||
<a href="#_transformobject-callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6526 "View in source") [Ⓣ][1]
|
||||
|
||||
An alternative to `_.reduce`; this method transforms `object` to a new `accumulator` object which is the result of running each of its own enumerable properties through a callback, with each callback execution potentially mutating the `accumulator` object. The callback is bound to `thisArg` and invoked with four arguments; *(accumulator, value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -4035,7 +4035,7 @@ var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key)
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_valuesobject"></a>`_.values(object)`
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6553 "View in source") [Ⓣ][1]
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6560 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property values of `object`.
|
||||
|
||||
@@ -4066,7 +4066,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_capitalizestring"></a>`_.capitalize(string)`
|
||||
<a href="#_capitalizestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6580 "View in source") [Ⓣ][1]
|
||||
<a href="#_capitalizestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6587 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the first character of `string` to upper case.
|
||||
|
||||
@@ -4090,7 +4090,7 @@ _.capitalize('fred');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6609 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6616 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters "&", "<", ">", '"', and "'" in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -4118,7 +4118,7 @@ _.escape('fred, barney, & pebbles');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data-options"></a>`_.template(text, [data], [options])`
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6700 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6707 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -4210,7 +4210,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_trimstring-charswhitespace"></a>`_.trim(string, [chars=whitespace])`
|
||||
<a href="#_trimstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6817 "View in source") [Ⓣ][1]
|
||||
<a href="#_trimstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6824 "View in source") [Ⓣ][1]
|
||||
|
||||
Removes leading and trailing whitespace or specified characters from `string`.
|
||||
|
||||
@@ -4238,7 +4238,7 @@ _.trim('-_-fred-_-', '_-');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_trimleftstring-charswhitespace"></a>`_.trimLeft(string, [chars=whitespace])`
|
||||
<a href="#_trimleftstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6841 "View in source") [Ⓣ][1]
|
||||
<a href="#_trimleftstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6848 "View in source") [Ⓣ][1]
|
||||
|
||||
Removes leading whitespace or specified characters from `string`.
|
||||
|
||||
@@ -4266,7 +4266,7 @@ _.trimLeft('-_-fred-_-', '_-');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_trimrightstring-charswhitespace"></a>`_.trimRight(string, [chars=whitespace])`
|
||||
<a href="#_trimrightstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6865 "View in source") [Ⓣ][1]
|
||||
<a href="#_trimrightstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6872 "View in source") [Ⓣ][1]
|
||||
|
||||
Removes trailing whitespace or specified characters from `string`.
|
||||
|
||||
@@ -4294,7 +4294,7 @@ _.trimRight('-_-fred-_-', '_-');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unescapestring"></a>`_.unescape(string)`
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6890 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6897 "View in source") [Ⓣ][1]
|
||||
|
||||
The inverse of `_.escape`; this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -4327,7 +4327,7 @@ _.unescape('fred, barney & pebbles');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_now"></a>`_.now`
|
||||
<a href="#_now">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7162 "View in source") [Ⓣ][1]
|
||||
<a href="#_now">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7169 "View in source") [Ⓣ][1]
|
||||
|
||||
*(unknown)*: Gets the number of milliseconds that have elapsed since the Unix epoch *(1 January `1970 00`:00:00 UTC)*.
|
||||
|
||||
@@ -4346,7 +4346,7 @@ _.defer(function() { console.log(_.now() - stamp); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_constantvalue"></a>`_.constant(value)`
|
||||
<a href="#_constantvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6915 "View in source") [Ⓣ][1]
|
||||
<a href="#_constantvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6922 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that returns `value`.
|
||||
|
||||
@@ -4372,7 +4372,7 @@ getter() === object;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_createcallbackfuncidentity-thisarg-argcount"></a>`_.createCallback([func=identity], [thisArg], [argCount])`
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6953 "View in source") [Ⓣ][1]
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6960 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a callback bound to an optional `thisArg`. If `func` is a property name the created callback will return the property value for a given element. If `func` is an object the created callback will return `true` for elements that contain the equivalent object properties, otherwise it will return `false`.
|
||||
|
||||
@@ -4414,7 +4414,7 @@ _.filter(characters, 'age__gt38');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6976 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6983 "View in source") [Ⓣ][1]
|
||||
|
||||
This method returns the first argument provided to it.
|
||||
|
||||
@@ -4439,7 +4439,7 @@ _.identity(object) === object;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_matchprops"></a>`_.match(props)`
|
||||
<a href="#_matchprops">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7005 "View in source") [Ⓣ][1]
|
||||
<a href="#_matchprops">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7012 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a "_.where" style function, which performs a deep comparison between a given object and the `props` object, returning `true` if the given object has equivalent property values, else `false`.
|
||||
|
||||
@@ -4473,7 +4473,7 @@ _.find(characters, matchAge);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobjectlodash-source-options"></a>`_.mixin([object=lodash], source, [options])`
|
||||
<a href="#_mixinobjectlodash-source-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7068 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobjectlodash-source-options">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7075 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds function properties of a source object to the destination object. If `object` is a function methods will be added to its prototype as well.
|
||||
|
||||
@@ -4511,7 +4511,7 @@ _('fred').vowels();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7128 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7135 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -4531,7 +4531,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noop"></a>`_.noop()`
|
||||
<a href="#_noop">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7145 "View in source") [Ⓣ][1]
|
||||
<a href="#_noop">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7152 "View in source") [Ⓣ][1]
|
||||
|
||||
A no-operation function.
|
||||
|
||||
@@ -4550,7 +4550,7 @@ _.noop(object) === undefined;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_parseintvalue-radix"></a>`_.parseInt(value, [radix])`
|
||||
<a href="#_parseintvalue-radix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7186 "View in source") [Ⓣ][1]
|
||||
<a href="#_parseintvalue-radix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7193 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts `value` to an integer of the specified radix. If `radix` is `undefined` or `0` a `radix` of `10` is used unless the `value` is a hexadecimal, in which case a `radix` of `16` is used.
|
||||
|
||||
@@ -4577,7 +4577,7 @@ _.parseInt('08');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_propertykey"></a>`_.property(key)`
|
||||
<a href="#_propertykey">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7217 "View in source") [Ⓣ][1]
|
||||
<a href="#_propertykey">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7224 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a "_.pluck" style function, which returns the `key` value of a given object.
|
||||
|
||||
@@ -4611,7 +4611,7 @@ _.sortBy(characters, getName);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_randommin0-max1-floatingfalse"></a>`_.random([min=0], [max=1], [floating=false])`
|
||||
<a href="#_randommin0-max1-floatingfalse">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7250 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0-max1-floatingfalse">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7257 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is provided a number between `0` and the given number will be returned. If `floating` is truey or either `min` or `max` are floats a floating-point number will be returned instead of an integer.
|
||||
|
||||
@@ -4646,7 +4646,7 @@ _.random(1.2, 5.2);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-key-defaultvalue"></a>`_.result(object, key, [defaultValue])`
|
||||
<a href="#_resultobject-key-defaultvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7315 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-key-defaultvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7322 "View in source") [Ⓣ][1]
|
||||
|
||||
Resolves the value of property `key` on `object`. If `key` is a function it will be invoked with the `this` binding of `object` and its result returned, else the property value is returned. If `object` is `null` or `undefined` then `undefined` is returned. If a default value is provided it will be returned if the property value resolves to `undefined`.
|
||||
|
||||
@@ -4703,7 +4703,7 @@ Create a new `lodash` function using the given context object.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback-thisarg"></a>`_.times(n, callback, [thisArg])`
|
||||
<a href="#_timesn-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7346 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback-thisarg">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7353 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the callback `n` times, returning an array of the results of each callback execution. The callback is bound to `thisArg` and invoked with one argument; *(index)*.
|
||||
|
||||
@@ -4735,7 +4735,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7374 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7381 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is provided the ID will be appended to it.
|
||||
|
||||
@@ -4788,7 +4788,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7582 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7589 "View in source") [Ⓣ][1]
|
||||
|
||||
*(string)*: The semantic version number.
|
||||
|
||||
|
||||
17
lodash.js
17
lodash.js
@@ -3875,15 +3875,22 @@
|
||||
* // => [['1', '2', '3'], ['4', '5', '6']]
|
||||
*/
|
||||
function invoke(collection, methodName) {
|
||||
var args = slice(arguments, 2),
|
||||
index = -1,
|
||||
var index = -1,
|
||||
isFunc = typeof methodName == 'function',
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
if (arguments.length < 3 && isArray(collection)) {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
result[index] = isFunc ? methodName.call(value) : value[methodName]();
|
||||
}
|
||||
} else {
|
||||
var args = slice(arguments, 2);
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
22
perf/perf.js
22
perf/perf.js
@@ -1228,30 +1228,40 @@
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.invoke` iterating an array')
|
||||
.add(buildName, '\
|
||||
lodash.invoke(numbers, "toFixed", "2")'
|
||||
lodash.invoke(numbers, "toFixed")'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.invoke(numbers, "toFixed", "2")'
|
||||
_.invoke(numbers, "toFixed")'
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.invoke` with arguments iterating an array')
|
||||
.add(buildName, '\
|
||||
lodash.invoke(numbers, "toFixed", 1)'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.invoke(numbers, "toFixed", 1)'
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.invoke` with a function for `methodName` iterating an array')
|
||||
.add(buildName, '\
|
||||
lodash.invoke(numbers, String.prototype.split, "")'
|
||||
lodash.invoke(numbers, Number.prototype.toFixed, 1)'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.invoke(numbers, String.prototype.split, "")'
|
||||
_.invoke(numbers, Number.prototype.toFixed, 1)'
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.invoke` iterating an object')
|
||||
.add(buildName, '\
|
||||
lodash.invoke(object, "toFixed", "2")'
|
||||
lodash.invoke(object, "toFixed", 1)'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.invoke(object, "toFixed", "2")'
|
||||
_.invoke(object, "toFixed", 1)'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user