mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Add _.parseInt.
Former-commit-id: 0c0f10af3dc50a4d1b684523f19d02e423d738f5
This commit is contained in:
5
build.js
5
build.js
@@ -140,6 +140,7 @@
|
||||
'omit': ['forIn', 'indexOf'],
|
||||
'once': [],
|
||||
'pairs': ['keys'],
|
||||
'parseInt': ['isString'],
|
||||
'partial': ['isFunction', 'isObject'],
|
||||
'partialRight': ['isFunction', 'isObject'],
|
||||
'pick': ['forIn', 'isObject'],
|
||||
@@ -260,6 +261,7 @@
|
||||
'forOwn',
|
||||
'isPlainObject',
|
||||
'merge',
|
||||
'parseInt',
|
||||
'partialRight',
|
||||
'runInContext'
|
||||
]));
|
||||
@@ -2493,6 +2495,9 @@
|
||||
if (isRemoved(source, 'keys')) {
|
||||
source = removeFunction(source, 'shimKeys');
|
||||
}
|
||||
if (isRemoved(source, 'parseInt')) {
|
||||
source = removeVar(source, 'nativeParseInt');
|
||||
}
|
||||
if (isRemoved(source, 'template')) {
|
||||
// remove `templateSettings` assignment
|
||||
source = source.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *lodash\.templateSettings[\s\S]+?};\n/, '');
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
'once',
|
||||
'Number',
|
||||
'pairs',
|
||||
'parseInt',
|
||||
'partial',
|
||||
'partialRight',
|
||||
'pick',
|
||||
|
||||
37
dist/lodash.compat.js
vendored
37
dist/lodash.compat.js
vendored
@@ -170,6 +170,7 @@
|
||||
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min,
|
||||
nativeParseInt = context.parseInt,
|
||||
nativeRandom = Math.random;
|
||||
|
||||
/** Detect various environments */
|
||||
@@ -289,13 +290,13 @@
|
||||
* `union`, `uniq`, `unshift`, `values`, `where`, `without`, `wrap`, and `zip`
|
||||
*
|
||||
* The non-chainable wrapper functions are:
|
||||
* `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`, `identity`,
|
||||
* `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
|
||||
* `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`,
|
||||
* `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`,
|
||||
* `lastIndexOf`, `mixin`, `noConflict`, `pop`, `random`, `reduce`, `reduceRight`,
|
||||
* `result`, `shift`, `size`, `some`, `sortedIndex`, `template`, `unescape`,
|
||||
* `uniqueId`, and `value`
|
||||
* `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`,
|
||||
* `identity`, `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`,
|
||||
* `isElement`, `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`,
|
||||
* `isNull`, `isNumber`, `isObject`, `isPlainObject`, `isRegExp`, `isString`,
|
||||
* `isUndefined`, `join`, `lastIndexOf`, `mixin`, `noConflict`, `parseInt`,
|
||||
* `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`, `size`, `some`,
|
||||
* `sortedIndex`, `runInContext`, `template`, `unescape`, `uniqueId`, and `value`
|
||||
*
|
||||
* The wrapper functions `first` and `last` return wrapped values when `n` is
|
||||
* passed, otherwise they return unwrapped values.
|
||||
@@ -2108,6 +2109,27 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the given `value` into an integer of the specified `radix`.
|
||||
*
|
||||
* Note: This method avoids differences in ES3 and ES5 `parseInt`
|
||||
* implementations. See http://es5.github.com/#E.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Mixed} value The value to parse.
|
||||
* @returns {Number} Returns the new integer value.
|
||||
* @example
|
||||
*
|
||||
* _.parseInt('08');
|
||||
* // => 8
|
||||
*/
|
||||
var parseInt = nativeParseInt('08') == 8 ? nativeParseInt : function(value, radix) {
|
||||
// Firefox and Opera have not changed to the ES5 specified implementation of `parseInt`
|
||||
return nativeParseInt(isString(value) ? value.replace(/^0+(?=.$)/, '') : value, radix || 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a shallow clone of `object` composed of the specified properties.
|
||||
* Property names may be specified as individual arguments or as arrays of property
|
||||
@@ -5056,6 +5078,7 @@
|
||||
lodash.lastIndexOf = lastIndexOf;
|
||||
lodash.mixin = mixin;
|
||||
lodash.noConflict = noConflict;
|
||||
lodash.parseInt = parseInt;
|
||||
lodash.random = random;
|
||||
lodash.reduce = reduce;
|
||||
lodash.reduceRight = reduceRight;
|
||||
|
||||
75
dist/lodash.compat.min.js
vendored
75
dist/lodash.compat.min.js
vendored
@@ -4,41 +4,40 @@
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(e){function o(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof o?(this.__wrapped__=n,void 0):new o(n)}function B(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||a);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";(Ht.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return Ht.call(o,e)&&-1<mt(o[e],r)}return-1<mt(n,r,t)}}function F(n){return n.charCodeAt(0)}function R(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;
|
||||
if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function P(n,t,r,e){function u(){var a=arguments,c=i?this:t;return o||(n=t[f]),r.length&&(a=a.length?(a=U(a),e?a.concat(r):r.concat(a)):r),this instanceof u?(c=C(n.prototype),a=n.apply(c,a),nt(a)?a:c):n.apply(c,a)}var o=Z(n),i=!r,f=t;return i&&(r=t),o||(t=n),u}function D(n,t,r){if(null==n)return xt;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=kr(n);return function(t){for(var r=u.length,e=!1;r--&&(e=Y(t[u[r]],n[u[r]],f)););return e
|
||||
}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function z(){for(var n,t={e:kt,f:Et,g:lr,i:sr,j:hr,k:_,b:"l(n)",c:"",h:"",l:"",m:!0},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r=qt,e="var j,n="+t.d+",u=n;if(!n)return u;"+t.l+";",t.b?(e+="var o=n.length;j=-1;if("+t.b+"){",t.j&&(e+="if(m(n)){n=n.split('')}"),e+="while(++j<o){"+t.h+"}}else{"):t.i&&(e+="var o=n.length;j=-1;if(o&&k(n)){while(++j<o){j+='';"+t.h+"}}else{"),t.f&&(e+="var v=typeof n=='function';"),t.g&&t.m?(e+="var s=-1,t=r[typeof n]?p(n):[],o=t.length;while(++s<o){j=t[s];",t.f&&(e+="if(!(v&&j=='prototype')){"),e+=t.h+"",t.f&&(e+="}")):(e+="for(j in n){",(t.f||t.m)&&(e+="if(",t.f&&(e+="!(v&&j=='prototype')"),t.f&&t.m&&(e+="&&"),t.m&&(e+="i.call(n,j)"),e+="){"),e+=t.h+";",(t.f||t.m)&&(e+="}")),e+="}",t.e){e+="var g=n.constructor;";
|
||||
for(var u=0;7>u;u++)e+="j='"+t.k[u]+"';if(","constructor"==t.k[u]&&(e+="!(g&&g.prototype===n)&&"),e+="i.call(n,j)){"+t.h+"}"}return(t.b||t.i)&&(e+="}"),e+=t.c+";return u",r("f,i,k,l,m,r,p","return function("+n+"){"+e+"}")(D,Ht,G,Sr,rt,N,rr)}function C(n){return M.prototype=n,n=new M,M.prototype=null,n}function T(n){return"\\"+$[n]}function K(n){return Er[n]}function L(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function M(){}function U(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);
|
||||
var e=-1;r=r-t||0;for(var u=It(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function V(n){return Ar[n]}function G(n){return Xt.call(n)==b}function H(n){var t=!1;if(!n||typeof n!="object"||G(n))return t;var r=n.constructor;return!Z(r)&&(!yr||!L(n))||r instanceof r?At?(xr(n,function(n,r,e){return t=!Ht.call(e,r),!1}),!1===t):(xr(n,function(n,r){t=r}),!1===t||Ht.call(n,t)):t}function J(n){var t=[];return Or(n,function(n,r){t.push(r)}),t}function Q(n,t,e,u,o,i){var f=n;if(typeof t=="function"&&(u=e,e=t,t=!1),typeof e=="function"){e=typeof u=="undefined"?e:D(e,u,1);
|
||||
var f=e(f),a=typeof f!="undefined";a||(f=n)}if(u=nt(f)){var c=Xt.call(f);if(!I[c]||yr&&L(f))return f;var l=Sr(f)}if(!u||!t)return u&&!a?l?U(f):Ir({},f):f;switch(u=dr[c],c){case w:case x:return a?f:new u(+f);case S:case A:return a?f:new u(f);case E:return a?f:u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return a||(f=l?u(f.length):{},l&&(Ht.call(n,"index")&&(f.index=n.index),Ht.call(n,"input")&&(f.input=n.input))),o.push(n),i.push(f),(l?ct:Or)(a?f:n,function(n,u){f[u]=Q(n,t,e,r,o,i)
|
||||
}),f}function W(n){var t=[];return xr(n,function(n,r){Z(n)&&t.push(r)}),t.sort()}function X(n){for(var t=-1,r=kr(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function Y(n,t,r,e,u,o){var i=r===f;if(r&&!i){r=typeof e=="undefined"?r:D(r,e,2);var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var c=typeof n,l=typeof t;if(n===n&&(!n||"function"!=c&&"object"!=c)&&(!t||"function"!=l&&"object"!=l))return!1;if(null==n||null==t)return n===t;if(l=Xt.call(n),c=Xt.call(t),l==b&&(l=k),c==b&&(c=k),l!=c)return!1;
|
||||
switch(l){case w:case x:return+n==+t;case S:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case E:case A:return n==t+""}if(c=l==j,!c){if(n.__wrapped__||t.__wrapped__)return Y(n.__wrapped__||n,t.__wrapped__||t,r,e,u,o);if(l!=k||yr&&(L(n)||L(t)))return!1;var l=!vr&&G(n)?Rt:n.constructor,p=!vr&&G(t)?Rt:t.constructor;if(l!=p&&(!Z(l)||!(l instanceof l&&Z(p)&&p instanceof p)))return!1}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;var s=0,a=!0;if(u.push(n),o.push(t),c){if(l=n.length,s=t.length,a=s==n.length,!a&&!i)return a;
|
||||
for(;s--;)if(c=l,p=t[s],i)for(;c--&&!(a=Y(n[c],p,r,e,u,o)););else if(!(a=Y(n[s],p,r,e,u,o)))break;return a}return xr(t,function(t,i,f){return Ht.call(f,i)?(s++,a=Ht.call(n,i)&&Y(n[i],t,r,e,u,o)):void 0}),a&&!i&&xr(n,function(n,t,r){return Ht.call(r,t)?a=-1<--s:void 0}),a}function Z(n){return typeof n=="function"}function nt(n){return n?N[typeof n]:!1}function tt(n){return typeof n=="number"||Xt.call(n)==S}function rt(n){return typeof n=="string"||Xt.call(n)==A}function et(n,t,r){var e=arguments,u=0,o=2;
|
||||
if(!nt(n))return n;if(r===f)var i=e[3],a=e[4],c=e[5];else a=[],c=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?i=D(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(i=e[--o]);for(;++u<o;)(Sr(e[u])?ct:Or)(e[u],function(t,r){var e,u,o=t,l=n[r];if(t&&((u=Sr(t))||$r(t))){for(o=a.length;o--;)if(e=a[o]==t){l=c[o];break}e||(l=u?Sr(l)?l:[]:$r(l)?l:{},i&&(o=i(l,t),typeof o!="undefined"&&(l=o)),a.push(t),c.push(l),i||(l=et(l,t,f,i,a,c)))}else i&&(o=i(l,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(l=o);
|
||||
n[r]=l});return n}function ut(n){for(var t=-1,r=kr(n),e=r.length,u=It(e);++t<e;)u[t]=n[r[t]];return u}function ot(n,t,r){var e=-1,u=n?n.length:0,o=!1;return r=(0>r?er(0,u+r):r)||0,typeof u=="number"?o=-1<(rt(n)?n.indexOf(t,r):mt(n,t,r)):wr(n,function(n){return++e<r?void 0:!(o=n===t)}),o}function it(n,t,r){var e=!0;if(t=D(t,r),Sr(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else wr(n,function(n,r,u){return e=!!t(n,r,u)});return e}function ft(n,t,r){var e=[];if(t=D(t,r),Sr(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];
|
||||
t(o,r,n)&&e.push(o)}}else wr(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function at(n,t,r){var e;return t=D(t,r),ct(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}function ct(n,t,r){if(t&&typeof r=="undefined"&&Sr(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else wr(n,t,r);return n}function lt(n,t,r){var e=-1,u=n?n.length:0,o=It(typeof u=="number"?u:0);if(t=D(t,r),Sr(n))for(;++e<u;)o[e]=t(n[e],e,n);else wr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function pt(n,t,r){var e=-1/0,u=e;
|
||||
if(!t&&Sr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&rt(n)?F:D(t,r),wr(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function st(n,t,r,e){var u=3>arguments.length;if(t=D(t,e,4),Sr(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)}else wr(n,function(n,e,o){r=u?(u=!1,n):t(r,n,e,o)});return r}function vt(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=kr(n),o=f.length;else hr&&rt(n)&&(u=n.split(""));return t=D(t,e,4),ct(n,function(n,e,a){e=f?f[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)
|
||||
}),r}function gt(n,t,r){var e;if(t=D(t,r),Sr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else wr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function ht(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=D(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];return U(n,0,ur(er(0,e),u))}}function yt(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Sr(o)?Jt.apply(u,t?o:yt(o)):u.push(o)}return u}function mt(n,t,r){var e=-1,u=n?n.length:0;
|
||||
if(typeof r=="number")e=(0>r?er(0,u+r):r||0)-1;else if(r)return e=_t(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function dt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=D(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:er(0,t);return U(n,e)}function _t(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?D(r,e,1):xt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function bt(n,t,r,e){var u=-1,o=n?n.length:0,i=[],f=i;typeof t=="function"&&(e=r,r=t,t=!1);var a=!t&&75<=o;
|
||||
if(a)var c={};for(r&&(f=[],r=D(r,e));++u<o;){e=n[u];var l=r?r(e,u,n):e;if(a)var p=l+"",p=Ht.call(c,p)?!(f=c[p]):f=c[p]=[];(t?!u||f[f.length-1]!==l:p||0>mt(f,l))&&((r||a)&&f.push(l),i.push(e))}return i}function jt(n,t){return cr||Yt&&2<arguments.length?Yt.call.apply(Yt,arguments):P(n,t,U(arguments,2))}function wt(n){var t=U(arguments,1);return Wt(function(){n.apply(r,t)},1)}function xt(n){return n}function Ot(n){ct(W(n),function(t){var r=o[t]=n[t];o.prototype[t]=function(){var n=[this.__wrapped__];
|
||||
return Jt.apply(n,arguments),new o(r.apply(o,n))}})}function St(){return this.__wrapped__}e=e?q.extend(C(n),e):n;var kt,Et,At,It=e.Array,Nt=e.Boolean,$t=e.Date,qt=e.Function,Bt=e.Math,Ft=e.Number,Rt=e.Object,Pt=e.RegExp,Dt=e.String,zt=It(),Ct=Rt(),Tt=e._,Kt=Pt("^"+(Ct.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Lt=Bt.ceil,Mt=e.clearTimeout,Ut=zt.concat,Vt=Bt.floor,Gt=Kt.test(Gt=Rt.getPrototypeOf)&&Gt,Ht=Ct.hasOwnProperty,Jt=zt.push,Qt=e.setImmediate,Wt=e.setTimeout,Xt=Ct.toString,Yt=Kt.test(Yt=U.bind)&&Yt,Zt=Kt.test(Zt=It.isArray)&&Zt,nr=e.isFinite,tr=e.isNaN,rr=Kt.test(rr=Rt.keys)&&rr,er=Bt.max,ur=Bt.min,or=Bt.random,ir=!!e.attachEvent,fr=!/\n{2,}/.test(qt()),ar=Yt&&!/\n|true/.test(Yt+ir),cr=Yt&&!ar,lr=rr&&(ir||ar||!fr),pr=(pr={0:1,length:1},zt.splice.call(pr,0,1),pr[0]),sr=!0;
|
||||
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)sr=!r;kt=!/valueOf/.test(t),Et=n.propertyIsEnumerable("prototype"),At="x"!=t[0]})(1);var vr=arguments.constructor==Rt,gr=!G(arguments),hr="xx"!="x"[0]+Rt("x")[0];try{var yr=Xt.call(document)==k&&!({toString:0}+"")}catch(mr){}var dr={};dr[j]=It,dr[w]=Nt,dr[x]=$t,dr[k]=Rt,dr[S]=Ft,dr[E]=Pt,dr[A]=Dt,o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:o}};
|
||||
var _r={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b<c){n=a[b];if(n&&r[typeof n]){",h:"if(typeof u[j]=='undefined')u[j]=n[j]",c:"}}"},br={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:f(d,x)",b:"typeof o=='number'",h:"if(d(n[j],j,e)===false)return u"},jr={l:"if(!r[typeof n])return u;"+br.l,b:!1},wr=z(br);gr&&(G=function(n){return n?Ht.call(n,"callee"):!1});var xr=z(br,jr,{m:!1}),Or=z(br,jr),Sr=Zt||function(n){return vr&&n instanceof It||Xt.call(n)==j},kr=rr?function(n){return nt(n)?Et&&typeof n=="function"||sr&&n.length&&G(n)?J(n):rr(n):[]
|
||||
}:J,Er={"&":"&","<":"<",">":">",'"':""","'":"'"},Ar=X(Er),Ir=z(_r,{l:_r.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=f(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[j]=d?d(u[j],n[j]):n[j]"}),Nr=z(_r);Z(/x/)&&(Z=function(n){return n instanceof qt||Xt.call(n)==O});var $r=Gt?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,r=typeof t=="function"&&(r=Gt(t))&&Gt(r);return r?n==r||Gt(n)==r&&!G(n):H(n)}:H,qr=lt,Br=ft;return ar&&u&&typeof Qt=="function"&&(wt=jt(Qt,e)),o.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
|
||||
}},o.assign=Ir,o.at=function(n){var t=-1,r=Ut.apply(zt,U(arguments,1)),e=r.length,u=It(e);for(hr&&rt(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},o.bind=jt,o.bindAll=function(n){for(var t=Ut.apply(zt,arguments),r=1<t.length?0:(t=W(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=jt(n[u],n)}return n},o.bindKey=function(n,t){return P(n,t,U(arguments,2))},o.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},o.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},o.countBy=function(n,t,r){var e={};return t=D(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",Ht.call(e,r)?e[r]++:e[r]=1}),e},o.debounce=function(n,t,r){function e(){f=null,r||(o=n.apply(i,u))}var u,o,i,f;return function(){var a=r&&!f;return u=arguments,i=this,Mt(f),f=Wt(e,t),a&&(o=n.apply(i,u)),o}},o.defaults=Nr,o.defer=wt,o.delay=function(n,t){var e=U(arguments,2);return Wt(function(){n.apply(r,e)},t)},o.difference=function(n){for(var t=-1,r=n?n.length:0,e=Ut.apply(zt,arguments),e=B(e,r),u=[];++t<r;){var o=n[t];
|
||||
e(o)||u.push(o)}return u},o.filter=ft,o.flatten=yt,o.forEach=ct,o.forIn=xr,o.forOwn=Or,o.functions=W,o.groupBy=function(n,t,r){var e={};return t=D(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",(Ht.call(e,r)?e[r]:e[r]=[]).push(n)}),e},o.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=D(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return U(n,0,ur(er(0,u-e),u))},o.intersection=function(n){var t=arguments,r=t.length,e={0:{}},u=-1,o=n?n.length:0,i=100<=o,f=[],a=f;
|
||||
n:for(;++u<o;){var c=n[u];if(i)var l=c+"",l=Ht.call(e[0],l)?!(a=e[0][l]):a=e[0][l]=[];if(l||0>mt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=B(t[p],0,100)))(c))continue n;f.push(c)}}return f},o.invert=X,o.invoke=function(n,t){var r=U(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=It(typeof o=="number"?o:0);return ct(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},o.keys=kr,o.map=lt,o.max=pt,o.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";
|
||||
return Ht.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},o.merge=et,o.min=function(n,t,r){var e=1/0,u=e;if(!t&&Sr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&rt(n)?F:D(t,r),wr(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},o.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},o.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=D(t,r);else var o=Ut.apply(zt,arguments);return xr(n,function(n,r,i){(e?!t(n,r,i):0>mt(o,r,1))&&(u[r]=n)
|
||||
}),u},o.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},o.pairs=function(n){for(var t=-1,r=kr(n),e=r.length,u=It(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},o.partial=function(n){return P(n,U(arguments,1))},o.partialRight=function(n){return P(n,U(arguments,1),null,f)},o.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=Ut.apply(zt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];f in n&&(e[f]=n[f])}else t=D(t,r),xr(n,function(n,r,u){t(n,r,u)&&(e[r]=n)
|
||||
});return e},o.pluck=qr,o.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=er(0,Lt((t-n)/r));for(var u=It(t);++e<t;)u[e]=n,n+=r;return u},o.reject=function(n,t,r){return t=D(t,r),ft(n,function(n,r,e){return!t(n,r,e)})},o.rest=dt,o.shuffle=function(n){var t=-1,r=n?n.length:0,e=It(typeof r=="number"?r:0);return ct(n,function(n){var r=Vt(or()*(++t+1));e[t]=e[r],e[r]=n}),e},o.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=It(typeof u=="number"?u:0);for(t=D(t,r),ct(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}
|
||||
}),u=o.length,o.sort(R);u--;)o[u]=o[u].c;return o},o.tap=function(n,t){return t(n),n},o.throttle=function(n,t){function r(){f=new $t,i=null,u=n.apply(o,e)}var e,u,o,i,f=0;return function(){var a=new $t,c=t-(a-f);return e=arguments,o=this,0<c?i||(i=Wt(r,c)):(Mt(i),i=null,f=a,u=n.apply(o,e)),u}},o.times=function(n,t,r){n=+n||0;for(var e=-1,u=It(n);++e<n;)u[e]=t.call(r,e);return u},o.toArray=function(n){return n&&typeof n.length=="number"?hr&&rt(n)?n.split(""):U(n):ut(n)},o.union=function(){return bt(Ut.apply(zt,arguments))
|
||||
},o.uniq=bt,o.values=ut,o.where=Br,o.without=function(n){for(var t=-1,r=n?n.length:0,e=B(arguments,1),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},o.wrap=function(n,t){return function(){var r=[n];return Jt.apply(r,arguments),t.apply(this,r)}},o.zip=function(n){for(var t=-1,r=n?pt(qr(arguments,"length")):0,e=It(r);++t<r;)e[t]=qr(arguments,t);return e},o.collect=lt,o.drop=dt,o.each=ct,o.extend=Ir,o.methods=W,o.select=ft,o.tail=dt,o.unique=bt,Ot(o),o.clone=Q,o.cloneDeep=function(n,t,r){return Q(n,!0,t,r)
|
||||
},o.contains=ot,o.escape=function(n){return null==n?"":(n+"").replace(m,K)},o.every=it,o.find=at,o.has=function(n,t){return n?Ht.call(n,t):!1},o.identity=xt,o.indexOf=mt,o.isArguments=G,o.isArray=Sr,o.isBoolean=function(n){return!0===n||!1===n||Xt.call(n)==w},o.isDate=function(n){return n instanceof $t||Xt.call(n)==x},o.isElement=function(n){return n?1===n.nodeType:!1},o.isEmpty=function(n){var t=!0;if(!n)return t;var r=Xt.call(n),e=n.length;return r==j||r==A||r==b||gr&&G(n)||r==k&&typeof e=="number"&&Z(n.splice)?!e:(Or(n,function(){return t=!1
|
||||
}),t)},o.isEqual=Y,o.isFinite=function(n){return nr(n)&&!tr(parseFloat(n))},o.isFunction=Z,o.isNaN=function(n){return tt(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=tt,o.isObject=nt,o.isPlainObject=$r,o.isRegExp=function(n){return n instanceof Pt||Xt.call(n)==E},o.isString=rt,o.isUndefined=function(n){return typeof n=="undefined"},o.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?er(0,e+r):ur(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},o.mixin=Ot,o.noConflict=function(){return e._=Tt,this
|
||||
},o.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Vt(or()*((+t||0)-n+1))},o.reduce=st,o.reduceRight=vt,o.result=function(n,t){var e=n?n[t]:r;return Z(e)?n[t]():e},o.runInContext=t,o.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:kr(n).length},o.some=gt,o.sortedIndex=_t,o.template=function(n,t,e){var u=o.templateSettings;n||(n=""),e=Nr({},e,u);var i,f=Nr({},e.imports,u.imports),u=kr(f),f=ut(f),a=0,c=e.interpolate||y,v="__p+='",c=Pt((e.escape||y).source+"|"+c.source+"|"+(c===h?g:y).source+"|"+(e.evaluate||y).source+"|$","g");
|
||||
n.replace(c,function(t,r,e,u,o,f){return e||(e=u),v+=n.slice(a,f).replace(d,T),r&&(v+="'+__e("+r+")+'"),o&&(i=!0,v+="';"+o+";__p+='"),e&&(v+="'+((__t=("+e+"))==null?'':__t)+'"),a=f+t.length,t}),v+="';\n",c=e=e.variable,c||(e="obj",v="with("+e+"){"+v+"}"),v=(i?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+e+"){"+(c?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";try{var m=qt(u,"return "+v).apply(r,f)
|
||||
}catch(_){throw _.source=v,_}return t?m(t):(m.source=v,m)},o.unescape=function(n){return null==n?"":(n+"").replace(c,V)},o.uniqueId=function(n){var t=++i;return(null==n?"":n+"")+t},o.all=it,o.any=gt,o.detect=at,o.foldl=st,o.foldr=vt,o.include=ot,o.inject=st,Or(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(){var t=[this.__wrapped__];return Jt.apply(t,arguments),n.apply(o,t)})}),o.first=ht,o.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=D(t,r);o--&&t(n[o],o,n);)e++
|
||||
}else if(e=t,null==e||r)return n[u-1];return U(n,er(0,u-e))}},o.take=ht,o.head=ht,Or(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);return null==t||r&&typeof t!="function"?e:new o(e)})}),o.VERSION="1.0.1",o.prototype.toString=function(){return this.__wrapped__+""},o.prototype.value=St,o.prototype.valueOf=St,wr(["join","pop","shift"],function(n){var t=zt[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),wr(["push","reverse","sort","unshift"],function(n){var t=zt[n];
|
||||
o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),wr(["concat","slice","splice"],function(n){var t=zt[n];o.prototype[n]=function(){return new o(t.apply(this.__wrapped__,arguments))}}),pr&&wr(["pop","shift","splice"],function(n){var t=zt[n],r="splice"==n;o.prototype[n]=function(){var n=this.__wrapped__,e=t.apply(n,arguments);return 0===n.length&&delete n[0],r?new o(e):e}}),o}var r,e=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==e&&module,o=typeof global=="object"&&global;
|
||||
o.global===o&&(n=o);var i=0,f={},a=30,c=/&(?:amp|lt|gt|quot|#39);/g,l=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/\w*$/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/<%=([\s\S]+?)%>/g,y=/($^)/,m=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),b="[object Arguments]",j="[object Array]",w="[object Boolean]",x="[object Date]",O="[object Function]",S="[object Number]",k="[object Object]",E="[object RegExp]",A="[object String]",I={};
|
||||
I[O]=!1,I[b]=I[j]=I[w]=I[x]=I[S]=I[k]=I[E]=I[A]=!0;var N={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},$={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},q=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=q,define(function(){return q})):e?u?(u.exports=q)._=q:e._=q:n._=q})(this);
|
||||
;(function(n){function t(i){function a(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof a?(this.__wrapped__=n,void 0):new a(n)}function P(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||p);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";(Wt.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return Wt.call(o,e)&&-1<bt(o[e],r)}return-1<bt(n,r,t)}}function D(n){return n.charCodeAt(0)}function z(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;
|
||||
if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function C(n,t,r,e){function u(){var a=arguments,c=i?this:t;return o||(n=t[f]),r.length&&(a=a.length?(a=H(a),e?a.concat(r):r.concat(a)):r),this instanceof u?(c=L(n.prototype),a=n.apply(c,a),et(a)?a:c):n.apply(c,a)}var o=rt(n),i=!r,f=t;return i&&(r=t),o||(t=n),u}function T(n,t,r){if(n==u)return kt;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var i=$r(n);return function(t){for(var r=i.length,e=o;r--&&(e=tt(t[i[r]],n[i[r]],l)););return e
|
||||
}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function K(){for(var n,t={e:At,f:$t,g:gr,i:yr,j:_r,k:w,b:"l(n)",c:"",h:"",l:"",m:e},r=0;n=arguments[r];r++)for(var u in n)t[u]=n[u];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r="var j,n="+t.d+",u=n;if(!n)return u;"+t.l+";",t.b?(r+="var o=n.length;j=-1;if("+t.b+"){",t.j&&(r+="if(m(n)){n=n.split('')}"),r+="while(++j<o){"+t.h+"}}else{"):t.i&&(r+="var o=n.length;j=-1;if(o&&k(n)){while(++j<o){j+='';"+t.h+"}}else{"),t.f&&(r+="var v=typeof n=='function';"),t.g&&t.m?(r+="var s=-1,t=r[typeof n]?p(n):[],o=t.length;while(++s<o){j=t[s];",t.f&&(r+="if(!(v&&j=='prototype')){"),r+=t.h+"",t.f&&(r+="}")):(r+="for(j in n){",(t.f||t.m)&&(r+="if(",t.f&&(r+="!(v&&j=='prototype')"),t.f&&t.m&&(r+="&&"),t.m&&(r+="i.call(n,j)"),r+="){"),r+=t.h+";",(t.f||t.m)&&(r+="}")),r+="}",t.e)for(r+="var g=n.constructor;",u=0;7>u;u++)r+="j='"+t.k[u]+"';if(","constructor"==t.k[u]&&(r+="!(g&&g.prototype===n)&&"),r+="i.call(n,j)){"+t.h+"}";
|
||||
return(t.b||t.i)&&(r+="}"),r+=t.c+";return u",Rt("f,i,k,l,m,r,p","return function("+n+"){"+r+"}")(T,Wt,Q,Ar,ot,B,or)}function L(n){return G.prototype=n,n=new G,G.prototype=u,n}function M(n){return"\\"+F[n]}function U(n){return Nr[n]}function V(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function G(){}function H(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=qt(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function J(n){return qr[n]}function Q(n){return nr.call(n)==x
|
||||
}function W(n){var t=o;if(!n||typeof n!="object"||Q(n))return t;var r=n.constructor;return!rt(r)&&(!br||!V(n))||r instanceof r?Nt?(Er(n,function(n,r,e){return t=!Wt.call(e,r),o}),t===o):(Er(n,function(n,r){t=r}),t===o||Wt.call(n,t)):t}function X(n){var t=[];return Ir(n,function(n,r){t.push(r)}),t}function Y(n,t,e,u,i,f){var a=n;if(typeof t=="function"&&(u=e,e=t,t=o),typeof e=="function"){e=typeof u=="undefined"?e:T(e,u,1);var a=e(a),c=typeof a!="undefined";c||(a=n)}if(u=et(a)){var l=nr.call(a);if(!q[l]||br&&V(a))return a;
|
||||
var p=Ar(a)}if(!u||!t)return u&&!c?p?H(a):Br({},a):a;switch(u=wr[l],l){case S:case k:return c?a:new u(+a);case I:case N:return c?a:new u(a);case $:return c?a:u(a.source,y.exec(a))}for(i||(i=[]),f||(f=[]),l=i.length;l--;)if(i[l]==n)return f[l];return c||(a=p?u(a.length):{},p&&(Wt.call(n,"index")&&(a.index=n.index),Wt.call(n,"input")&&(a.input=n.input))),i.push(n),f.push(a),(p?st:Ir)(c?a:n,function(n,u){a[u]=Y(n,t,e,r,i,f)}),a}function Z(n){var t=[];return Er(n,function(n,r){rt(n)&&t.push(r)}),t.sort()
|
||||
}function nt(n){for(var t=-1,r=$r(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function tt(n,t,r,i,f,a){var c=r===l;if(r&&!c){r=typeof i=="undefined"?r:T(r,i,2);var p=r(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return o;if(n==u||t==u)return n===t;if(v=nr.call(n),s=nr.call(t),v==x&&(v=A),s==x&&(s=A),v!=s)return o;switch(v){case S:case k:return+n==+t;case I:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;
|
||||
case $:case N:return n==t+""}if(s=v==O,!s){if(n.__wrapped__||t.__wrapped__)return tt(n.__wrapped__||n,t.__wrapped__||t,r,i,f,a);if(v!=A||br&&(V(n)||V(t)))return o;var v=!mr&&Q(n)?zt:n.constructor,g=!mr&&Q(t)?zt:t.constructor;if(v!=g&&(!rt(v)||!(v instanceof v&&rt(g)&&g instanceof g)))return o}for(f||(f=[]),a||(a=[]),v=f.length;v--;)if(f[v]==n)return a[v]==t;var h=0,p=e;if(f.push(n),a.push(t),s){if(v=n.length,h=t.length,p=h==n.length,!p&&!c)return p;for(;h--;)if(s=v,g=t[h],c)for(;s--&&!(p=tt(n[s],g,r,i,f,a)););else if(!(p=tt(n[h],g,r,i,f,a)))break;
|
||||
return p}return Er(t,function(t,e,u){return Wt.call(u,e)?(h++,p=Wt.call(n,e)&&tt(n[e],t,r,i,f,a)):void 0}),p&&!c&&Er(n,function(n,t,r){return Wt.call(r,t)?p=-1<--h:void 0}),p}function rt(n){return typeof n=="function"}function et(n){return n?B[typeof n]:o}function ut(n){return typeof n=="number"||nr.call(n)==I}function ot(n){return typeof n=="string"||nr.call(n)==N}function it(n,t,r){var e=arguments,u=0,o=2;if(!et(n))return n;if(r===l)var i=e[3],f=e[4],a=e[5];else f=[],a=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?i=T(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(i=e[--o]);
|
||||
for(;++u<o;)(Ar(e[u])?st:Ir)(e[u],function(t,r){var e,u,o=t,c=n[r];if(t&&((u=Ar(t))||Rr(t))){for(o=f.length;o--;)if(e=f[o]==t){c=a[o];break}e||(c=u?Ar(c)?c:[]:Rr(c)?c:{},i&&(o=i(c,t),typeof o!="undefined"&&(c=o)),f.push(t),a.push(c),i||(c=it(c,t,l,i,f,a)))}else i&&(o=i(c,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(c=o);n[r]=c});return n}function ft(n){for(var t=-1,r=$r(n),e=r.length,u=qt(e);++t<e;)u[t]=n[r[t]];return u}function at(n,t,r){var e=-1,u=n?n.length:0,i=o;return r=(0>r?ir(0,u+r):r)||0,typeof u=="number"?i=-1<(ot(n)?n.indexOf(t,r):bt(n,t,r)):kr(n,function(n){return++e<r?void 0:!(i=n===t)
|
||||
}),i}function ct(n,t,r){var u=e;if(t=T(t,r),Ar(n)){r=-1;for(var o=n.length;++r<o&&(u=!!t(n[r],r,n)););}else kr(n,function(n,r,e){return u=!!t(n,r,e)});return u}function lt(n,t,r){var e=[];if(t=T(t,r),Ar(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else kr(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function pt(n,t,r){var e;return t=T(t,r),st(n,function(n,r,u){return t(n,r,u)?(e=n,o):void 0}),e}function st(n,t,r){if(t&&typeof r=="undefined"&&Ar(n)){r=-1;for(var e=n.length;++r<e&&t(n[r],r,n)!==o;);}else kr(n,t,r);
|
||||
return n}function vt(n,t,r){var e=-1,u=n?n.length:0,o=qt(typeof u=="number"?u:0);if(t=T(t,r),Ar(n))for(;++e<u;)o[e]=t(n[e],e,n);else kr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function gt(n,t,r){var e=-1/0,u=e;if(!t&&Ar(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&ot(n)?D:T(t,r),kr(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function ht(n,t,r,e){var u=3>arguments.length;if(t=T(t,e,4),Ar(n)){var i=-1,f=n.length;for(u&&(r=n[++i]);++i<f;)r=t(r,n[i],i,n)}else kr(n,function(n,e,i){r=u?(u=o,n):t(r,n,e,i)
|
||||
});return r}function yt(n,t,r,e){var u=n,i=n?n.length:0,f=3>arguments.length;if(typeof i!="number")var a=$r(n),i=a.length;else _r&&ot(n)&&(u=n.split(""));return t=T(t,e,4),st(n,function(n,e,c){e=a?a[--i]:--i,r=f?(f=o,u[e]):t(r,u[e],e,c)}),r}function mt(n,t,r){var e;if(t=T(t,r),Ar(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else kr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function dt(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=-1;for(t=T(t,r);++i<o&&t(n[i],i,n);)e++
|
||||
}else if(e=t,e==u||r)return n[0];return H(n,0,fr(ir(0,e),o))}}function _t(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Ar(o)?Xt.apply(u,t?o:_t(o)):u.push(o)}return u}function bt(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?ir(0,u+r):r||0)-1;else if(r)return e=wt(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function jt(n,t,r){if(typeof t!="number"&&t!=u){var e=0,o=-1,i=n?n.length:0;for(t=T(t,r);++o<i&&t(n[o],o,n);)e++}else e=t==u||r?1:ir(0,t);return H(n,e)
|
||||
}function wt(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?T(r,e,1):kt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function xt(n,t,r,e){var u=-1,i=n?n.length:0,f=[],a=f;typeof t=="function"&&(e=r,r=t,t=o);var c=!t&&75<=i;if(c)var l={};for(r&&(a=[],r=T(r,e));++u<i;){e=n[u];var p=r?r(e,u,n):e;if(c)var s=p+"",s=Wt.call(l,s)?!(a=l[s]):a=l[s]=[];(t?!u||a[a.length-1]!==p:s||0>bt(a,p))&&((r||c)&&a.push(p),f.push(e))}return f}function Ot(n,t){return vr||tr&&2<arguments.length?tr.call.apply(tr,arguments):C(n,t,H(arguments,2))
|
||||
}function St(n){var t=H(arguments,1);return Zt(function(){n.apply(r,t)},1)}function kt(n){return n}function Et(n){st(Z(n),function(t){var r=a[t]=n[t];a.prototype[t]=function(){var n=[this.__wrapped__];return Xt.apply(n,arguments),new a(r.apply(a,n))}})}function It(){return this.__wrapped__}i=i?R.extend(L(n),i):n;var At,$t,Nt,qt=i.Array,Bt=i.Boolean,Ft=i.Date,Rt=i.Function,Pt=i.Math,Dt=i.Number,zt=i.Object,Ct=i.RegExp,Tt=i.String,Kt=qt(),Lt=zt(),Mt=i._,Ut=Ct("^"+(Lt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Vt=Pt.ceil,Gt=i.clearTimeout,Ht=Kt.concat,Jt=Pt.floor,Qt=Ut.test(Qt=zt.getPrototypeOf)&&Qt,Wt=Lt.hasOwnProperty,Xt=Kt.push,Yt=i.setImmediate,Zt=i.setTimeout,nr=Lt.toString,tr=Ut.test(tr=H.bind)&&tr,rr=Ut.test(rr=qt.isArray)&&rr,er=i.isFinite,ur=i.isNaN,or=Ut.test(or=zt.keys)&&or,ir=Pt.max,fr=Pt.min,ar=i.parseInt,cr=Pt.random,lr=!!i.attachEvent,pr=!/\n{2,}/.test(Rt()),sr=tr&&!/\n|true/.test(tr+lr),vr=tr&&!sr,gr=or&&(lr||sr||!pr),hr=(hr={0:1,length:1},Kt.splice.call(hr,0,1),hr[0]),yr=e;
|
||||
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)yr=!r;At=!/valueOf/.test(t),$t=n.propertyIsEnumerable("prototype"),Nt="x"!=t[0]})(1);var mr=arguments.constructor==zt,dr=!Q(arguments),_r="xx"!="x"[0]+zt("x")[0];try{var br=nr.call(document)==A&&!({toString:0}+"")}catch(jr){}var wr={};wr[O]=qt,wr[S]=Bt,wr[k]=Ft,wr[A]=zt,wr[I]=Dt,wr[$]=Ct,wr[N]=Tt,a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:a}};
|
||||
var xr={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b<c){n=a[b];if(n&&r[typeof n]){",h:"if(typeof u[j]=='undefined')u[j]=n[j]",c:"}}"},Or={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:f(d,x)",b:"typeof o=='number'",h:"if(d(n[j],j,e)===false)return u"},Sr={l:"if(!r[typeof n])return u;"+Or.l,b:o},kr=K(Or);dr&&(Q=function(n){return n?Wt.call(n,"callee"):o});var Er=K(Or,Sr,{m:o}),Ir=K(Or,Sr),Ar=rr||function(n){return mr&&n instanceof qt||nr.call(n)==O},$r=or?function(n){return et(n)?$t&&typeof n=="function"||yr&&n.length&&Q(n)?X(n):or(n):[]
|
||||
}:X,Nr={"&":"&","<":"<",">":">",'"':""","'":"'"},qr=nt(Nr),Br=K(xr,{l:xr.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=f(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[j]=d?d(u[j],n[j]):n[j]"}),Fr=K(xr);rt(/x/)&&(rt=function(n){return n instanceof Rt||nr.call(n)==E});var Rr=Qt?function(n){if(!n||typeof n!="object")return o;var t=n.valueOf,r=typeof t=="function"&&(r=Qt(t))&&Qt(r);return r?n==r||Qt(n)==r&&!Q(n):W(n)}:W,Pr=8==ar("08")?ar:function(n,t){return ar(ot(n)?n.replace(/^0+(?=.$)/,""):n,t||0)
|
||||
},Dr=vt,zr=lt;return sr&&f&&typeof Yt=="function"&&(St=Ot(Yt,i)),a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=Br,a.at=function(n){var t=-1,r=Ht.apply(Kt,H(arguments,1)),e=r.length,u=qt(e);for(_r&&ot(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},a.bind=Ot,a.bindAll=function(n){for(var t=Ht.apply(Kt,arguments),r=1<t.length?0:(t=Z(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=Ot(n[u],n)}return n},a.bindKey=function(n,t){return C(n,t,H(arguments,2))
|
||||
},a.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},a.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},a.countBy=function(n,t,r){var e={};return t=T(t,r),st(n,function(n,r,u){r=t(n,r,u)+"",Wt.call(e,r)?e[r]++:e[r]=1}),e},a.debounce=function(n,t,r){function e(){a=u,r||(i=n.apply(f,o))}var o,i,f,a;return function(){var u=r&&!a;return o=arguments,f=this,Gt(a),a=Zt(e,t),u&&(i=n.apply(f,o)),i
|
||||
}},a.defaults=Fr,a.defer=St,a.delay=function(n,t){var e=H(arguments,2);return Zt(function(){n.apply(r,e)},t)},a.difference=function(n){for(var t=-1,r=n?n.length:0,e=Ht.apply(Kt,arguments),e=P(e,r),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},a.filter=lt,a.flatten=_t,a.forEach=st,a.forIn=Er,a.forOwn=Ir,a.functions=Z,a.groupBy=function(n,t,r){var e={};return t=T(t,r),st(n,function(n,r,u){r=t(n,r,u)+"",(Wt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},a.initial=function(n,t,r){if(!n)return[];var e=0,o=n.length;
|
||||
if(typeof t!="number"&&t!=u){var i=o;for(t=T(t,r);i--&&t(n[i],i,n);)e++}else e=t==u||r?1:t||e;return H(n,0,fr(ir(0,o-e),o))},a.intersection=function(n){var t=arguments,r=t.length,e={0:{}},u=-1,o=n?n.length:0,i=100<=o,f=[],a=f;n:for(;++u<o;){var c=n[u];if(i)var l=c+"",l=Wt.call(e[0],l)?!(a=e[0][l]):a=e[0][l]=[];if(l||0>bt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=P(t[p],0,100)))(c))continue n;f.push(c)}}return f},a.invert=nt,a.invoke=function(n,t){var r=H(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=qt(typeof o=="number"?o:0);
|
||||
return st(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},a.keys=$r,a.map=vt,a.max=gt,a.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return Wt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},a.merge=it,a.min=function(n,t,r){var e=1/0,u=e;if(!t&&Ar(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&ot(n)?D:T(t,r),kr(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},a.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];
|
||||
t?u[o]=t[r]:u[o[0]]=o[1]}return u},a.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=T(t,r);else var o=Ht.apply(Kt,arguments);return Er(n,function(n,r,i){(e?!t(n,r,i):0>bt(o,r,1))&&(u[r]=n)}),u},a.once=function(n){var t,r;return function(){return t?r:(t=e,r=n.apply(this,arguments),n=u,r)}},a.pairs=function(n){for(var t=-1,r=$r(n),e=r.length,u=qt(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},a.partial=function(n){return C(n,H(arguments,1))},a.partialRight=function(n){return C(n,H(arguments,1),u,l)
|
||||
},a.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=Ht.apply(Kt,arguments),i=et(n)?o.length:0;++u<i;){var f=o[u];f in n&&(e[f]=n[f])}else t=T(t,r),Er(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},a.pluck=Dr,a.range=function(n,t,r){n=+n||0,r=+r||1,t==u&&(t=n,n=0);var e=-1;t=ir(0,Vt((t-n)/r));for(var o=qt(t);++e<t;)o[e]=n,n+=r;return o},a.reject=function(n,t,r){return t=T(t,r),lt(n,function(n,r,e){return!t(n,r,e)})},a.rest=jt,a.shuffle=function(n){var t=-1,r=n?n.length:0,e=qt(typeof r=="number"?r:0);
|
||||
return st(n,function(n){var r=Jt(cr()*(++t+1));e[t]=e[r],e[r]=n}),e},a.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=qt(typeof u=="number"?u:0);for(t=T(t,r),st(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(z);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function r(){a=new Ft,f=u,o=n.apply(i,e)}var e,o,i,f,a=0;return function(){var c=new Ft,l=t-(c-a);return e=arguments,i=this,0<l?f||(f=Zt(r,l)):(Gt(f),f=u,a=c,o=n.apply(i,e)),o}},a.times=function(n,t,r){n=+n||0;
|
||||
for(var e=-1,u=qt(n);++e<n;)u[e]=t.call(r,e);return u},a.toArray=function(n){return n&&typeof n.length=="number"?_r&&ot(n)?n.split(""):H(n):ft(n)},a.union=function(){return xt(Ht.apply(Kt,arguments))},a.uniq=xt,a.values=ft,a.where=zr,a.without=function(n){for(var t=-1,r=n?n.length:0,e=P(arguments,1),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},a.wrap=function(n,t){return function(){var r=[n];return Xt.apply(r,arguments),t.apply(this,r)}},a.zip=function(n){for(var t=-1,r=n?gt(Dr(arguments,"length")):0,e=qt(r);++t<r;)e[t]=Dr(arguments,t);
|
||||
return e},a.collect=vt,a.drop=jt,a.each=st,a.extend=Br,a.methods=Z,a.select=lt,a.tail=jt,a.unique=xt,Et(a),a.clone=Y,a.cloneDeep=function(n,t,r){return Y(n,e,t,r)},a.contains=at,a.escape=function(n){return n==u?"":(n+"").replace(b,U)},a.every=ct,a.find=pt,a.has=function(n,t){return n?Wt.call(n,t):o},a.identity=kt,a.indexOf=bt,a.isArguments=Q,a.isArray=Ar,a.isBoolean=function(n){return n===e||n===o||nr.call(n)==S},a.isDate=function(n){return n instanceof Ft||nr.call(n)==k},a.isElement=function(n){return n?1===n.nodeType:o
|
||||
},a.isEmpty=function(n){var t=e;if(!n)return t;var r=nr.call(n),u=n.length;return r==O||r==N||r==x||dr&&Q(n)||r==A&&typeof u=="number"&&rt(n.splice)?!u:(Ir(n,function(){return t=o}),t)},a.isEqual=tt,a.isFinite=function(n){return er(n)&&!ur(parseFloat(n))},a.isFunction=rt,a.isNaN=function(n){return ut(n)&&n!=+n},a.isNull=function(n){return n===u},a.isNumber=ut,a.isObject=et,a.isPlainObject=Rr,a.isRegExp=function(n){return n instanceof Ct||nr.call(n)==$},a.isString=ot,a.isUndefined=function(n){return typeof n=="undefined"
|
||||
},a.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?ir(0,e+r):fr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},a.mixin=Et,a.noConflict=function(){return i._=Mt,this},a.parseInt=Pr,a.random=function(n,t){return n==u&&t==u&&(t=1),n=+n||0,t==u&&(t=n,n=0),n+Jt(cr()*((+t||0)-n+1))},a.reduce=ht,a.reduceRight=yt,a.result=function(n,t){var e=n?n[t]:r;return rt(e)?n[t]():e},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:$r(n).length},a.some=mt,a.sortedIndex=wt,a.template=function(n,t,u){var o=a.templateSettings;
|
||||
n||(n=""),u=Fr({},u,o);var i,f=Fr({},u.imports,o.imports),o=$r(f),f=ft(f),c=0,l=u.interpolate||_,p="__p+='",l=Ct((u.escape||_).source+"|"+l.source+"|"+(l===d?m:_).source+"|"+(u.evaluate||_).source+"|$","g");n.replace(l,function(t,r,u,o,f,a){return u||(u=o),p+=n.slice(c,a).replace(j,M),r&&(p+="'+__e("+r+")+'"),f&&(i=e,p+="';"+f+";__p+='"),u&&(p+="'+((__t=("+u+"))==null?'':__t)+'"),c=a+t.length,t}),p+="';\n",l=u=u.variable,l||(u="obj",p="with("+u+"){"+p+"}"),p=(i?p.replace(v,""):p).replace(g,"$1").replace(h,"$1;"),p="function("+u+"){"+(l?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+p+"return __p}";
|
||||
try{var s=Rt(o,"return "+p).apply(r,f)}catch(y){throw y.source=p,y}return t?s(t):(s.source=p,s)},a.unescape=function(n){return n==u?"":(n+"").replace(s,J)},a.uniqueId=function(n){var t=++c;return(n==u?"":n+"")+t},a.all=ct,a.any=mt,a.detect=pt,a.foldl=ht,a.foldr=yt,a.include=at,a.inject=ht,Ir(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Xt.apply(t,arguments),n.apply(a,t)})}),a.first=dt,a.last=function(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=o;
|
||||
for(t=T(t,r);i--&&t(n[i],i,n);)e++}else if(e=t,e==u||r)return n[o-1];return H(n,ir(0,o-e))}},a.take=dt,a.head=dt,Ir(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);return t==u||r&&typeof t!="function"?e:new a(e)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return this.__wrapped__+""},a.prototype.value=It,a.prototype.valueOf=It,kr(["join","pop","shift"],function(n){var t=Kt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}
|
||||
}),kr(["push","reverse","sort","unshift"],function(n){var t=Kt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),kr(["concat","slice","splice"],function(n){var t=Kt[n];a.prototype[n]=function(){return new a(t.apply(this.__wrapped__,arguments))}}),hr&&kr(["pop","shift","splice"],function(n){var t=Kt[n],r="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,e=t.apply(n,arguments);return 0===n.length&&delete n[0],r?new a(e):e}}),a}var r,e=!0,u=null,o=!1,i=typeof exports=="object"&&exports,f=typeof module=="object"&&module&&module.exports==i&&module,a=typeof global=="object"&&global;
|
||||
a.global===a&&(n=a);var c=0,l={},p=30,s=/&(?:amp|lt|gt|quot|#39);/g,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,h=/(__e\(.*?\)|\b__t\))\+'';/g,y=/\w*$/,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,d=/<%=([\s\S]+?)%>/g,_=/($^)/,b=/[&<>"']/g,j=/['\n\r\t\u2028\u2029\\]/g,w="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),x="[object Arguments]",O="[object Array]",S="[object Boolean]",k="[object Date]",E="[object Function]",I="[object Number]",A="[object Object]",$="[object RegExp]",N="[object String]",q={};
|
||||
q[E]=o,q[x]=q[O]=q[S]=q[k]=q[I]=q[A]=q[$]=q[N]=e;var B={"boolean":o,"function":e,object:e,number:o,string:o,undefined:o},F={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},R=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=R,define(function(){return R})):i?f?(f.exports=R)._=R:i._=R:n._=R})(this);
|
||||
37
dist/lodash.js
vendored
37
dist/lodash.js
vendored
@@ -164,6 +164,7 @@
|
||||
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min,
|
||||
nativeParseInt = context.parseInt,
|
||||
nativeRandom = Math.random;
|
||||
|
||||
/** Detect various environments */
|
||||
@@ -211,13 +212,13 @@
|
||||
* `union`, `uniq`, `unshift`, `values`, `where`, `without`, `wrap`, and `zip`
|
||||
*
|
||||
* The non-chainable wrapper functions are:
|
||||
* `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`, `identity`,
|
||||
* `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
|
||||
* `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`,
|
||||
* `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`,
|
||||
* `lastIndexOf`, `mixin`, `noConflict`, `pop`, `random`, `reduce`, `reduceRight`,
|
||||
* `result`, `shift`, `size`, `some`, `sortedIndex`, `template`, `unescape`,
|
||||
* `uniqueId`, and `value`
|
||||
* `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`,
|
||||
* `identity`, `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`,
|
||||
* `isElement`, `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`,
|
||||
* `isNull`, `isNumber`, `isObject`, `isPlainObject`, `isRegExp`, `isString`,
|
||||
* `isUndefined`, `join`, `lastIndexOf`, `mixin`, `noConflict`, `parseInt`,
|
||||
* `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`, `size`, `some`,
|
||||
* `sortedIndex`, `runInContext`, `template`, `unescape`, `uniqueId`, and `value`
|
||||
*
|
||||
* The wrapper functions `first` and `last` return wrapped values when `n` is
|
||||
* passed, otherwise they return unwrapped values.
|
||||
@@ -1959,6 +1960,27 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the given `value` into an integer of the specified `radix`.
|
||||
*
|
||||
* Note: This method avoids differences in ES3 and ES5 `parseInt`
|
||||
* implementations. See http://es5.github.com/#E.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Mixed} value The value to parse.
|
||||
* @returns {Number} Returns the new integer value.
|
||||
* @example
|
||||
*
|
||||
* _.parseInt('08');
|
||||
* // => 8
|
||||
*/
|
||||
var parseInt = nativeParseInt('08') == 8 ? nativeParseInt : function(value, radix) {
|
||||
// Firefox and Opera have not changed to the ES5 specified implementation of `parseInt`
|
||||
return nativeParseInt(isString(value) ? value.replace(/^0+(?=.$)/, '') : value, radix || 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a shallow clone of `object` composed of the specified properties.
|
||||
* Property names may be specified as individual arguments or as arrays of property
|
||||
@@ -4900,6 +4922,7 @@
|
||||
lodash.lastIndexOf = lastIndexOf;
|
||||
lodash.mixin = mixin;
|
||||
lodash.noConflict = noConflict;
|
||||
lodash.parseInt = parseInt;
|
||||
lodash.random = random;
|
||||
lodash.reduce = reduce;
|
||||
lodash.reduceRight = reduceRight;
|
||||
|
||||
69
dist/lodash.min.js
vendored
69
dist/lodash.min.js
vendored
@@ -4,37 +4,38 @@
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(e){function o(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof o?(this.__wrapped__=n,void 0):new o(n)}function q(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||a);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";(Tt.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return Tt.call(o,e)&&-1<vt(o[e],r)}return-1<vt(n,r,t)}}function I(n){return n.charCodeAt(0)}function B(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;
|
||||
if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function F(n,t,r,e){function u(){var a=arguments,c=i?this:t;return o||(n=t[f]),r.length&&(a=a.length?(a=K(a),e?a.concat(r):r.concat(a)):r),this instanceof u?(c=z(n.prototype),a=n.apply(c,a),W(a)?a:c):n.apply(c,a)}var o=Q(n),i=!r,f=t;return i&&(r=t),o||(t=n),u}function R(n,t,r){if(null==n)return _t;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=ir(n);return function(t){for(var r=u.length,e=!1;r--&&(e=L(t[u[r]],n[u[r]],f)););return e
|
||||
}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function D(){for(var n,t={g:nr,b:"l(n)",c:"",h:"",l:"",m:!0},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];return n=t.a,t.d=/^[^,]+/.exec(n)[0],r=St,e="var j,n="+t.d+",u=n;if(!n)return u;"+t.l+";",t.b&&(e+="var o=n.length;j=-1;if("+t.b+"){while(++j<o){"+t.h+"}}else{"),t.g&&t.m?e+="var s=-1,t=r[typeof n]?p(n):[],o=t.length;while(++s<o){j=t[s];"+t.h+"}":(e+="for(j in n){",t.m&&(e+="if(",t.m&&(e+="i.call(n,j)"),e+="){"),e+=t.h+";",t.m&&(e+="}"),e+="}"),t.b&&(e+="}"),e+=t.c+";return u",r("f,i,k,l,m,r,p","return function("+n+"){"+e+"}")(R,Tt,U,or,Y,E,Qt)
|
||||
}function z(n){return T.prototype=n,n=new T,T.prototype=null,n}function C(n){return"\\"+N[n]}function P(n){return fr[n]}function T(){}function K(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=wt(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function M(n){return ar[n]}function U(n){return Vt.call(n)==_}function V(n){var t=[];return ur(n,function(n,r){t.push(r)}),t}function G(n,t,e,u,o,i){var f=n;if(typeof t=="function"&&(u=e,e=t,t=!1),typeof e=="function"){e=typeof u=="undefined"?e:R(e,u,1);
|
||||
var f=e(f),a=typeof f!="undefined";a||(f=n)}if(u=W(f)){var c=Vt.call(f);if(!k[c])return f;var l=or(f)}if(!u||!t)return u&&!a?l?K(f):cr({},f):f;switch(u=tr[c],c){case j:case w:return a?f:new u(+f);case x:case A:return a?f:new u(f);case S:return a?f:u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return a||(f=l?u(f.length):{},l&&(Tt.call(n,"index")&&(f.index=n.index),Tt.call(n,"input")&&(f.input=n.input))),o.push(n),i.push(f),(l?ot:ur)(a?f:n,function(n,u){f[u]=G(n,t,e,r,o,i)
|
||||
}),f}function H(n){var t=[];return er(n,function(n,r){Q(n)&&t.push(r)}),t.sort()}function J(n){for(var t=-1,r=ir(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function L(n,t,r,e,u,o){var i=r===f;if(r&&!i){r=typeof e=="undefined"?r:R(r,e,2);var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var c=typeof n,l=typeof t;if(n===n&&(!n||"function"!=c&&"object"!=c)&&(!t||"function"!=l&&"object"!=l))return!1;if(null==n||null==t)return n===t;if(l=Vt.call(n),c=Vt.call(t),l==_&&(l=O),c==_&&(c=O),l!=c)return!1;
|
||||
switch(l){case j:case w:return+n==+t;case x:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case S:case A:return n==t+""}if(c=l==b,!c){if(n.__wrapped__||t.__wrapped__)return L(n.__wrapped__||n,t.__wrapped__||t,r,e,u,o);if(l!=O)return!1;var l=n.constructor,p=t.constructor;if(l!=p&&(!Q(l)||!(l instanceof l&&Q(p)&&p instanceof p)))return!1}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;var s=0,a=!0;if(u.push(n),o.push(t),c){if(l=n.length,s=t.length,a=s==n.length,!a&&!i)return a;for(;s--;)if(c=l,p=t[s],i)for(;c--&&!(a=L(n[c],p,r,e,u,o)););else if(!(a=L(n[s],p,r,e,u,o)))break;
|
||||
return a}return er(t,function(t,i,f){return Tt.call(f,i)?(s++,a=Tt.call(n,i)&&L(n[i],t,r,e,u,o)):void 0}),a&&!i&&er(n,function(n,t,r){return Tt.call(r,t)?a=-1<--s:void 0}),a}function Q(n){return typeof n=="function"}function W(n){return n?E[typeof n]:!1}function X(n){return typeof n=="number"||Vt.call(n)==x}function Y(n){return typeof n=="string"||Vt.call(n)==A}function Z(n,t,r){var e=arguments,u=0,o=2;if(!W(n))return n;if(r===f)var i=e[3],a=e[4],c=e[5];else a=[],c=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?i=R(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(i=e[--o]);
|
||||
for(;++u<o;)(or(e[u])?ot:ur)(e[u],function(t,r){var e,u,o=t,l=n[r];if(t&&((u=or(t))||pr(t))){for(o=a.length;o--;)if(e=a[o]==t){l=c[o];break}e||(l=u?or(l)?l:[]:pr(l)?l:{},i&&(o=i(l,t),typeof o!="undefined"&&(l=o)),a.push(t),c.push(l),i||(l=Z(l,t,f,i,a,c)))}else i&&(o=i(l,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(l=o);n[r]=l});return n}function nt(n){for(var t=-1,r=ir(n),e=r.length,u=wt(e);++t<e;)u[t]=n[r[t]];return u}function tt(n,t,r){var e=-1,u=n?n.length:0,o=!1;return r=(0>r?Wt(0,u+r):r)||0,typeof u=="number"?o=-1<(Y(n)?n.indexOf(t,r):vt(n,t,r)):rr(n,function(n){return++e<r?void 0:!(o=n===t)
|
||||
}),o}function rt(n,t,r){var e=!0;if(t=R(t,r),or(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else rr(n,function(n,r,u){return e=!!t(n,r,u)});return e}function et(n,t,r){var e=[];if(t=R(t,r),or(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else rr(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function ut(n,t,r){var e;return t=R(t,r),ot(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}function ot(n,t,r){if(t&&typeof r=="undefined"&&or(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else rr(n,t,r);
|
||||
return n}function it(n,t,r){var e=-1,u=n?n.length:0,o=wt(typeof u=="number"?u:0);if(t=R(t,r),or(n))for(;++e<u;)o[e]=t(n[e],e,n);else rr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function ft(n,t,r){var e=-1/0,u=e;if(!t&&or(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&Y(n)?I:R(t,r),rr(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function at(n,t,r,e){var u=3>arguments.length;if(t=R(t,e,4),or(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)}else rr(n,function(n,e,o){r=u?(u=!1,n):t(r,n,e,o)
|
||||
});return r}function ct(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=ir(n),u=i.length;return t=R(t,e,4),ot(n,function(e,f,a){f=i?i[--u]:--u,r=o?(o=!1,n[f]):t(r,n[f],f,a)}),r}function lt(n,t,r){var e;if(t=R(t,r),or(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else rr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function pt(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=R(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];
|
||||
return K(n,0,Xt(Wt(0,e),u))}}function st(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];or(o)?Kt.apply(u,t?o:st(o)):u.push(o)}return u}function vt(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?Wt(0,u+r):r||0)-1;else if(r)return e=ht(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function gt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=R(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:Wt(0,t);return K(n,e)}function ht(n,t,r,e){var u=0,o=n?n.length:u;
|
||||
for(r=r?R(r,e,1):_t,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function yt(n,t,r,e){var u=-1,o=n?n.length:0,i=[],f=i;typeof t=="function"&&(e=r,r=t,t=!1);var a=!t&&75<=o;if(a)var c={};for(r&&(f=[],r=R(r,e));++u<o;){e=n[u];var l=r?r(e,u,n):e;if(a)var p=l+"",p=Tt.call(c,p)?!(f=c[p]):f=c[p]=[];(t?!u||f[f.length-1]!==l:p||0>vt(f,l))&&((r||a)&&f.push(l),i.push(e))}return i}function mt(n,t){return Zt||Gt&&2<arguments.length?Gt.call.apply(Gt,arguments):F(n,t,K(arguments,2))}function dt(n){var t=K(arguments,1);
|
||||
return Ut(function(){n.apply(r,t)},1)}function _t(n){return n}function bt(n){ot(H(n),function(t){var r=o[t]=n[t];o.prototype[t]=function(){var n=[this.__wrapped__];return Kt.apply(n,arguments),new o(r.apply(o,n))}})}function jt(){return this.__wrapped__}e=e?$.extend(z(n),e):n;var wt=e.Array,xt=e.Boolean,Ot=e.Date,St=e.Function,At=e.Math,kt=e.Number,Et=e.Object,Nt=e.RegExp,$t=e.String,qt=wt(),It=Et(),Bt=e._,Ft=Nt("^"+(It.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Rt=At.ceil,Dt=e.clearTimeout,zt=qt.concat,Ct=At.floor,Pt=Ft.test(Pt=Et.getPrototypeOf)&&Pt,Tt=It.hasOwnProperty,Kt=qt.push,Mt=e.setImmediate,Ut=e.setTimeout,Vt=It.toString,Gt=Ft.test(Gt=K.bind)&&Gt,Ht=Ft.test(Ht=wt.isArray)&&Ht,Jt=e.isFinite,Lt=e.isNaN,Qt=Ft.test(Qt=Et.keys)&&Qt,Wt=At.max,Xt=At.min,Yt=At.random,It=!!e.attachEvent,Ft=!/\n{2,}/.test(St()),At=Gt&&!/\n|true/.test(Gt+It),Zt=Gt&&!At,nr=Qt&&(It||At||!Ft),tr={};
|
||||
tr[b]=wt,tr[j]=xt,tr[w]=Ot,tr[O]=Et,tr[x]=kt,tr[S]=Nt,tr[A]=$t,o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:o}};var xt={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b<c){n=a[b];if(n&&r[typeof n]){",h:"if(typeof u[j]=='undefined')u[j]=n[j]",c:"}}"},kt={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:f(d,x)",b:"typeof o=='number'",h:"if(d(n[j],j,e)===false)return u"},Et={l:"if(!r[typeof n])return u;"+kt.l,b:!1},rr=D(kt),er=D(kt,Et,{m:!1}),ur=D(kt,Et),or=Ht||function(n){return n instanceof wt||Vt.call(n)==b
|
||||
},ir=Qt?function(n){return W(n)?Qt(n):[]}:V,fr={"&":"&","<":"<",">":">",'"':""","'":"'"},ar=J(fr),cr=D(xt,{l:xt.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=f(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[j]=d?d(u[j],n[j]):n[j]"}),lr=D(xt),pr=function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,r=typeof t=="function"&&(r=Pt(t))&&Pt(r);if(r)n=n==r||Pt(n)==r&&!U(n);else{var e=!1;!n||typeof n!="object"||U(n)?n=e:(t=n.constructor,!Q(t)||t instanceof t?(er(n,function(n,t){e=t
|
||||
}),n=!1===e||Tt.call(n,e)):n=e)}return n};return At&&u&&typeof Mt=="function"&&(dt=mt(Mt,e)),o.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},o.assign=cr,o.at=function(n){for(var t=-1,r=zt.apply(qt,K(arguments,1)),e=r.length,u=wt(e);++t<e;)u[t]=n[r[t]];return u},o.bind=mt,o.bindAll=function(n){for(var t=zt.apply(qt,arguments),r=1<t.length?0:(t=H(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=mt(n[u],n)}return n},o.bindKey=function(n,t){return F(n,t,K(arguments,2))
|
||||
},o.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},o.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},o.countBy=function(n,t,r){var e={};return t=R(t,r),ot(n,function(n,r,u){r=t(n,r,u)+"",Tt.call(e,r)?e[r]++:e[r]=1}),e},o.debounce=function(n,t,r){function e(){f=null,r||(o=n.apply(i,u))}var u,o,i,f;return function(){var a=r&&!f;return u=arguments,i=this,Dt(f),f=Ut(e,t),a&&(o=n.apply(i,u)),o
|
||||
}},o.defaults=lr,o.defer=dt,o.delay=function(n,t){var e=K(arguments,2);return Ut(function(){n.apply(r,e)},t)},o.difference=function(n){for(var t=-1,r=n?n.length:0,e=zt.apply(qt,arguments),e=q(e,r),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},o.filter=et,o.flatten=st,o.forEach=ot,o.forIn=er,o.forOwn=ur,o.functions=H,o.groupBy=function(n,t,r){var e={};return t=R(t,r),ot(n,function(n,r,u){r=t(n,r,u)+"",(Tt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},o.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=R(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return K(n,0,Xt(Wt(0,u-e),u))},o.intersection=function(n){var t=arguments,r=t.length,e={0:{}},u=-1,o=n?n.length:0,i=100<=o,f=[],a=f;n:for(;++u<o;){var c=n[u];if(i)var l=c+"",l=Tt.call(e[0],l)?!(a=e[0][l]):a=e[0][l]=[];if(l||0>vt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=q(t[p],0,100)))(c))continue n;f.push(c)}}return f},o.invert=J,o.invoke=function(n,t){var r=K(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=wt(typeof o=="number"?o:0);
|
||||
return ot(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},o.keys=ir,o.map=it,o.max=ft,o.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return Tt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},o.merge=Z,o.min=function(n,t,r){var e=1/0,u=e;if(!t&&or(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&Y(n)?I:R(t,r),rr(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},o.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];
|
||||
t?u[o]=t[r]:u[o[0]]=o[1]}return u},o.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=R(t,r);else var o=zt.apply(qt,arguments);return er(n,function(n,r,i){(e?!t(n,r,i):0>vt(o,r,1))&&(u[r]=n)}),u},o.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},o.pairs=function(n){for(var t=-1,r=ir(n),e=r.length,u=wt(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},o.partial=function(n){return F(n,K(arguments,1))},o.partialRight=function(n){return F(n,K(arguments,1),null,f)
|
||||
},o.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=zt.apply(qt,arguments),i=W(n)?o.length:0;++u<i;){var f=o[u];f in n&&(e[f]=n[f])}else t=R(t,r),er(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},o.pluck=it,o.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=Wt(0,Rt((t-n)/r));for(var u=wt(t);++e<t;)u[e]=n,n+=r;return u},o.reject=function(n,t,r){return t=R(t,r),et(n,function(n,r,e){return!t(n,r,e)})},o.rest=gt,o.shuffle=function(n){var t=-1,r=n?n.length:0,e=wt(typeof r=="number"?r:0);
|
||||
return ot(n,function(n){var r=Ct(Yt()*(++t+1));e[t]=e[r],e[r]=n}),e},o.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=wt(typeof u=="number"?u:0);for(t=R(t,r),ot(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(B);u--;)o[u]=o[u].c;return o},o.tap=function(n,t){return t(n),n},o.throttle=function(n,t){function r(){f=new Ot,i=null,u=n.apply(o,e)}var e,u,o,i,f=0;return function(){var a=new Ot,c=t-(a-f);return e=arguments,o=this,0<c?i||(i=Ut(r,c)):(Dt(i),i=null,f=a,u=n.apply(o,e)),u}
|
||||
},o.times=function(n,t,r){n=+n||0;for(var e=-1,u=wt(n);++e<n;)u[e]=t.call(r,e);return u},o.toArray=function(n){return n&&typeof n.length=="number"?K(n):nt(n)},o.union=function(){return yt(zt.apply(qt,arguments))},o.uniq=yt,o.values=nt,o.where=et,o.without=function(n){for(var t=-1,r=n?n.length:0,e=q(arguments,1),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},o.wrap=function(n,t){return function(){var r=[n];return Kt.apply(r,arguments),t.apply(this,r)}},o.zip=function(n){for(var t=-1,r=n?ft(it(arguments,"length")):0,e=wt(r);++t<r;)e[t]=it(arguments,t);
|
||||
return e},o.collect=it,o.drop=gt,o.each=ot,o.extend=cr,o.methods=H,o.select=et,o.tail=gt,o.unique=yt,bt(o),o.clone=G,o.cloneDeep=function(n,t,r){return G(n,!0,t,r)},o.contains=tt,o.escape=function(n){return null==n?"":(n+"").replace(m,P)},o.every=rt,o.find=ut,o.has=function(n,t){return n?Tt.call(n,t):!1},o.identity=_t,o.indexOf=vt,o.isArguments=U,o.isArray=or,o.isBoolean=function(n){return!0===n||!1===n||Vt.call(n)==j},o.isDate=function(n){return n instanceof Ot||Vt.call(n)==w},o.isElement=function(n){return n?1===n.nodeType:!1
|
||||
},o.isEmpty=function(n){var t=!0;if(!n)return t;var r=Vt.call(n),e=n.length;return r==b||r==A||r==_||r==O&&typeof e=="number"&&Q(n.splice)?!e:(ur(n,function(){return t=!1}),t)},o.isEqual=L,o.isFinite=function(n){return Jt(n)&&!Lt(parseFloat(n))},o.isFunction=Q,o.isNaN=function(n){return X(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=X,o.isObject=W,o.isPlainObject=pr,o.isRegExp=function(n){return n instanceof Nt||Vt.call(n)==S},o.isString=Y,o.isUndefined=function(n){return typeof n=="undefined"
|
||||
},o.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Wt(0,e+r):Xt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},o.mixin=bt,o.noConflict=function(){return e._=Bt,this},o.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Ct(Yt()*((+t||0)-n+1))},o.reduce=at,o.reduceRight=ct,o.result=function(n,t){var e=n?n[t]:r;return Q(e)?n[t]():e},o.runInContext=t,o.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ir(n).length},o.some=lt,o.sortedIndex=ht,o.template=function(n,t,e){var u=o.templateSettings;
|
||||
n||(n=""),e=lr({},e,u);var i,f=lr({},e.imports,u.imports),u=ir(f),f=nt(f),a=0,c=e.interpolate||y,v="__p+='",c=Nt((e.escape||y).source+"|"+c.source+"|"+(c===h?g:y).source+"|"+(e.evaluate||y).source+"|$","g");n.replace(c,function(t,r,e,u,o,f){return e||(e=u),v+=n.slice(a,f).replace(d,C),r&&(v+="'+__e("+r+")+'"),o&&(i=!0,v+="';"+o+";__p+='"),e&&(v+="'+((__t=("+e+"))==null?'':__t)+'"),a=f+t.length,t}),v+="';\n",c=e=e.variable,c||(e="obj",v="with("+e+"){"+v+"}"),v=(i?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+e+"){"+(c?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";
|
||||
try{var m=St(u,"return "+v).apply(r,f)}catch(_){throw _.source=v,_}return t?m(t):(m.source=v,m)},o.unescape=function(n){return null==n?"":(n+"").replace(c,M)},o.uniqueId=function(n){var t=++i;return(null==n?"":n+"")+t},o.all=rt,o.any=lt,o.detect=ut,o.foldl=at,o.foldr=ct,o.include=tt,o.inject=at,ur(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(){var t=[this.__wrapped__];return Kt.apply(t,arguments),n.apply(o,t)})}),o.first=pt,o.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;
|
||||
for(t=R(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return K(n,Wt(0,u-e))}},o.take=pt,o.head=pt,ur(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);return null==t||r&&typeof t!="function"?e:new o(e)})}),o.VERSION="1.0.1",o.prototype.toString=function(){return this.__wrapped__+""},o.prototype.value=jt,o.prototype.valueOf=jt,rr(["join","pop","shift"],function(n){var t=qt[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
|
||||
}}),rr(["push","reverse","sort","unshift"],function(n){var t=qt[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),rr(["concat","slice","splice"],function(n){var t=qt[n];o.prototype[n]=function(){return new o(t.apply(this.__wrapped__,arguments))}}),o}var r,e=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==e&&module,o=typeof global=="object"&&global;o.global===o&&(n=o);var i=0,f={},a=30,c=/&(?:amp|lt|gt|quot|#39);/g,l=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/\w*$/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/<%=([\s\S]+?)%>/g,y=/($^)/,m=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,_="[object Arguments]",b="[object Array]",j="[object Boolean]",w="[object Date]",x="[object Number]",O="[object Object]",S="[object RegExp]",A="[object String]",k={"[object Function]":!1};
|
||||
k[_]=k[b]=k[j]=k[w]=k[x]=k[O]=k[S]=k[A]=!0;var E={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},N={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},$=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=$,define(function(){return $})):e?u?(u.exports=$)._=$:e._=$:n._=$})(this);
|
||||
;(function(n){function t(i){function a(n){if(!n||typeof n!="object")return o;var t=n.valueOf,r=typeof t=="function"&&(r=Ut(t))&&Ut(r);if(r)n=n==r||Ut(n)==r&&!J(n);else{var e=o;!n||typeof n!="object"||J(n)?n=e:(t=n.constructor,!Z(t)||t instanceof t?(ar(n,function(n,t){e=t}),n=e===o||Vt.call(n,e)):n=e)}return n}function F(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof F?(this.__wrapped__=n,void 0):new F(n)}function R(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||p);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";
|
||||
(Vt.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return Vt.call(o,e)&&-1<mt(o[e],r)}return-1<mt(n,r,t)}}function D(n){return n.charCodeAt(0)}function z(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function C(n,t,r,e){function u(){var a=arguments,c=i?this:t;return o||(n=t[f]),r.length&&(a=a.length?(a=G(a),e?a.concat(r):r.concat(a)):r),this instanceof u?(c=K(n.prototype),a=n.apply(c,a),nt(a)?a:c):n.apply(c,a)
|
||||
}var o=Z(n),i=!r,f=t;return i&&(r=t),o||(t=n),u}function P(n,t,r){if(n==u)return xt;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var i=pr(n);return function(t){for(var r=i.length,e=o;r--&&(e=Y(t[i[r]],n[i[r]],l)););return e}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function T(){for(var n,t={g:or,b:"l(n)",c:"",h:"",l:"",m:e},r=0;n=arguments[r];r++)for(var u in n)t[u]=n[u];
|
||||
return n=t.a,t.d=/^[^,]+/.exec(n)[0],r="var j,n="+t.d+",u=n;if(!n)return u;"+t.l+";",t.b&&(r+="var o=n.length;j=-1;if("+t.b+"){while(++j<o){"+t.h+"}}else{"),t.g&&t.m?r+="var s=-1,t=r[typeof n]?p(n):[],o=t.length;while(++s<o){j=t[s];"+t.h+"}":(r+="for(j in n){",t.m&&(r+="if(",t.m&&(r+="i.call(n,j)"),r+="){"),r+=t.h+";",t.m&&(r+="}"),r+="}"),t.b&&(r+="}"),r+=t.c+";return u",Et("f,i,k,l,m,r,p","return function("+n+"){"+r+"}")(P,Vt,J,lr,rt,N,Zt)}function K(n){return V.prototype=n,n=new V,V.prototype=u,n
|
||||
}function M(n){return"\\"+q[n]}function U(n){return sr[n]}function V(){}function G(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=At(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function H(n){return vr[n]}function J(n){return Lt.call(n)==w}function L(n){var t=[];return cr(n,function(n,r){t.push(r)}),t}function Q(n,t,e,u,i,f){var a=n;if(typeof t=="function"&&(u=e,e=t,t=o),typeof e=="function"){e=typeof u=="undefined"?e:P(e,u,1);var a=e(a),c=typeof a!="undefined";c||(a=n)
|
||||
}if(u=nt(a)){var l=Lt.call(a);if(!I[l])return a;var p=lr(a)}if(!u||!t)return u&&!c?p?G(a):gr({},a):a;switch(u=ir[l],l){case O:case S:return c?a:new u(+a);case A:case E:return c?a:new u(a);case k:return c?a:u(a.source,y.exec(a))}for(i||(i=[]),f||(f=[]),l=i.length;l--;)if(i[l]==n)return f[l];return c||(a=p?u(a.length):{},p&&(Vt.call(n,"index")&&(a.index=n.index),Vt.call(n,"input")&&(a.input=n.input))),i.push(n),f.push(a),(p?ct:cr)(c?a:n,function(n,u){a[u]=Q(n,t,e,r,i,f)}),a}function W(n){var t=[];return ar(n,function(n,r){Z(n)&&t.push(r)
|
||||
}),t.sort()}function X(n){for(var t=-1,r=pr(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function Y(n,t,r,i,f,a){var c=r===l;if(r&&!c){r=typeof i=="undefined"?r:P(r,i,2);var p=r(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return o;if(n==u||t==u)return n===t;if(v=Lt.call(n),s=Lt.call(t),v==w&&(v=$),s==w&&(s=$),v!=s)return o;switch(v){case O:case S:return+n==+t;
|
||||
case A:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case k:case E:return n==t+""}if(s=v==x,!s){if(n.__wrapped__||t.__wrapped__)return Y(n.__wrapped__||n,t.__wrapped__||t,r,i,f,a);if(v!=$)return o;var v=n.constructor,g=t.constructor;if(v!=g&&(!Z(v)||!(v instanceof v&&Z(g)&&g instanceof g)))return o}for(f||(f=[]),a||(a=[]),v=f.length;v--;)if(f[v]==n)return a[v]==t;var h=0,p=e;if(f.push(n),a.push(t),s){if(v=n.length,h=t.length,p=h==n.length,!p&&!c)return p;for(;h--;)if(s=v,g=t[h],c)for(;s--&&!(p=Y(n[s],g,r,i,f,a)););else if(!(p=Y(n[h],g,r,i,f,a)))break;
|
||||
return p}return ar(t,function(t,e,u){return Vt.call(u,e)?(h++,p=Vt.call(n,e)&&Y(n[e],t,r,i,f,a)):void 0}),p&&!c&&ar(n,function(n,t,r){return Vt.call(r,t)?p=-1<--h:void 0}),p}function Z(n){return typeof n=="function"}function nt(n){return n?N[typeof n]:o}function tt(n){return typeof n=="number"||Lt.call(n)==A}function rt(n){return typeof n=="string"||Lt.call(n)==E}function et(n,t,r){var e=arguments,u=0,o=2;if(!nt(n))return n;if(r===l)var i=e[3],f=e[4],c=e[5];else f=[],c=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?i=P(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(i=e[--o]);
|
||||
for(;++u<o;)(lr(e[u])?ct:cr)(e[u],function(t,r){var e,u,o=t,p=n[r];if(t&&((u=lr(t))||a(t))){for(o=f.length;o--;)if(e=f[o]==t){p=c[o];break}e||(p=u?lr(p)?p:[]:a(p)?p:{},i&&(o=i(p,t),typeof o!="undefined"&&(p=o)),f.push(t),c.push(p),i||(p=et(p,t,l,i,f,c)))}else i&&(o=i(p,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(p=o);n[r]=p});return n}function ut(n){for(var t=-1,r=pr(n),e=r.length,u=At(e);++t<e;)u[t]=n[r[t]];return u}function ot(n,t,r){var e=-1,u=n?n.length:0,i=o;return r=(0>r?nr(0,u+r):r)||0,typeof u=="number"?i=-1<(rt(n)?n.indexOf(t,r):mt(n,t,r)):fr(n,function(n){return++e<r?void 0:!(i=n===t)
|
||||
}),i}function it(n,t,r){var u=e;if(t=P(t,r),lr(n)){r=-1;for(var o=n.length;++r<o&&(u=!!t(n[r],r,n)););}else fr(n,function(n,r,e){return u=!!t(n,r,e)});return u}function ft(n,t,r){var e=[];if(t=P(t,r),lr(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else fr(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function at(n,t,r){var e;return t=P(t,r),ct(n,function(n,r,u){return t(n,r,u)?(e=n,o):void 0}),e}function ct(n,t,r){if(t&&typeof r=="undefined"&&lr(n)){r=-1;for(var e=n.length;++r<e&&t(n[r],r,n)!==o;);}else fr(n,t,r);
|
||||
return n}function lt(n,t,r){var e=-1,u=n?n.length:0,o=At(typeof u=="number"?u:0);if(t=P(t,r),lr(n))for(;++e<u;)o[e]=t(n[e],e,n);else fr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function pt(n,t,r){var e=-1/0,u=e;if(!t&&lr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&rt(n)?D:P(t,r),fr(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function st(n,t,r,e){var u=3>arguments.length;if(t=P(t,e,4),lr(n)){var i=-1,f=n.length;for(u&&(r=n[++i]);++i<f;)r=t(r,n[i],i,n)}else fr(n,function(n,e,i){r=u?(u=o,n):t(r,n,e,i)
|
||||
});return r}function vt(n,t,r,e){var u=n?n.length:0,i=3>arguments.length;if(typeof u!="number")var f=pr(n),u=f.length;return t=P(t,e,4),ct(n,function(e,a,c){a=f?f[--u]:--u,r=i?(i=o,n[a]):t(r,n[a],a,c)}),r}function gt(n,t,r){var e;if(t=P(t,r),lr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else fr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function ht(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=-1;for(t=P(t,r);++i<o&&t(n[i],i,n);)e++}else if(e=t,e==u||r)return n[0];
|
||||
return G(n,0,tr(nr(0,e),o))}}function yt(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];lr(o)?Gt.apply(u,t?o:yt(o)):u.push(o)}return u}function mt(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?nr(0,u+r):r||0)-1;else if(r)return e=_t(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function dt(n,t,r){if(typeof t!="number"&&t!=u){var e=0,o=-1,i=n?n.length:0;for(t=P(t,r);++o<i&&t(n[o],o,n);)e++}else e=t==u||r?1:nr(0,t);return G(n,e)}function _t(n,t,r,e){var u=0,o=n?n.length:u;
|
||||
for(r=r?P(r,e,1):xt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function bt(n,t,r,e){var u=-1,i=n?n.length:0,f=[],a=f;typeof t=="function"&&(e=r,r=t,t=o);var c=!t&&75<=i;if(c)var l={};for(r&&(a=[],r=P(r,e));++u<i;){e=n[u];var p=r?r(e,u,n):e;if(c)var s=p+"",s=Vt.call(l,s)?!(a=l[s]):a=l[s]=[];(t?!u||a[a.length-1]!==p:s||0>mt(a,p))&&((r||c)&&a.push(p),f.push(e))}return f}function jt(n,t){return ur||Qt&&2<arguments.length?Qt.call.apply(Qt,arguments):C(n,t,G(arguments,2))}function wt(n){var t=G(arguments,1);
|
||||
return Jt(function(){n.apply(r,t)},1)}function xt(n){return n}function Ot(n){ct(W(n),function(t){var r=F[t]=n[t];F.prototype[t]=function(){var n=[this.__wrapped__];return Gt.apply(n,arguments),new F(r.apply(F,n))}})}function St(){return this.__wrapped__}i=i?B.extend(K(n),i):n;var At=i.Array,$t=i.Boolean,kt=i.Date,Et=i.Function,It=i.Math,Nt=i.Number,qt=i.Object,Bt=i.RegExp,Ft=i.String,Rt=At(),Dt=qt(),zt=i._,Ct=Bt("^"+(Dt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Pt=It.ceil,Tt=i.clearTimeout,Kt=Rt.concat,Mt=It.floor,Ut=Ct.test(Ut=qt.getPrototypeOf)&&Ut,Vt=Dt.hasOwnProperty,Gt=Rt.push,Ht=i.setImmediate,Jt=i.setTimeout,Lt=Dt.toString,Qt=Ct.test(Qt=G.bind)&&Qt,Wt=Ct.test(Wt=At.isArray)&&Wt,Xt=i.isFinite,Yt=i.isNaN,Zt=Ct.test(Zt=qt.keys)&&Zt,nr=It.max,tr=It.min,rr=i.parseInt,er=It.random,Dt=!!i.attachEvent,Ct=!/\n{2,}/.test(Et()),It=Qt&&!/\n|true/.test(Qt+Dt),ur=Qt&&!It,or=Zt&&(Dt||It||!Ct),ir={};
|
||||
ir[x]=At,ir[O]=$t,ir[S]=kt,ir[$]=qt,ir[A]=Nt,ir[k]=Bt,ir[E]=Ft,F.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:F}};var $t={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b<c){n=a[b];if(n&&r[typeof n]){",h:"if(typeof u[j]=='undefined')u[j]=n[j]",c:"}}"},Nt={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:f(d,x)",b:"typeof o=='number'",h:"if(d(n[j],j,e)===false)return u"},qt={l:"if(!r[typeof n])return u;"+Nt.l,b:o},fr=T(Nt),ar=T(Nt,qt,{m:o}),cr=T(Nt,qt),lr=Wt||function(n){return n instanceof At||Lt.call(n)==x
|
||||
},pr=Zt?function(n){return nt(n)?Zt(n):[]}:L,sr={"&":"&","<":"<",">":">",'"':""","'":"'"},vr=X(sr),gr=T($t,{l:$t.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=f(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[j]=d?d(u[j],n[j]):n[j]"}),hr=T($t),Wt=8==rr("08")?rr:function(n,t){return rr(rt(n)?n.replace(/^0+(?=.$)/,""):n,t||0)};return It&&f&&typeof Ht=="function"&&(wt=jt(Ht,i)),F.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
|
||||
}},F.assign=gr,F.at=function(n){for(var t=-1,r=Kt.apply(Rt,G(arguments,1)),e=r.length,u=At(e);++t<e;)u[t]=n[r[t]];return u},F.bind=jt,F.bindAll=function(n){for(var t=Kt.apply(Rt,arguments),r=1<t.length?0:(t=W(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=jt(n[u],n)}return n},F.bindKey=function(n,t){return C(n,t,G(arguments,2))},F.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},F.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},F.countBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",Vt.call(e,r)?e[r]++:e[r]=1}),e},F.debounce=function(n,t,r){function e(){a=u,r||(i=n.apply(f,o))}var o,i,f,a;return function(){var u=r&&!a;return o=arguments,f=this,Tt(a),a=Jt(e,t),u&&(i=n.apply(f,o)),i}},F.defaults=hr,F.defer=wt,F.delay=function(n,t){var e=G(arguments,2);return Jt(function(){n.apply(r,e)},t)},F.difference=function(n){for(var t=-1,r=n?n.length:0,e=Kt.apply(Rt,arguments),e=R(e,r),u=[];++t<r;){var o=n[t];
|
||||
e(o)||u.push(o)}return u},F.filter=ft,F.flatten=yt,F.forEach=ct,F.forIn=ar,F.forOwn=cr,F.functions=W,F.groupBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",(Vt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},F.initial=function(n,t,r){if(!n)return[];var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=o;for(t=P(t,r);i--&&t(n[i],i,n);)e++}else e=t==u||r?1:t||e;return G(n,0,tr(nr(0,o-e),o))},F.intersection=function(n){var t=arguments,r=t.length,e={0:{}},u=-1,o=n?n.length:0,i=100<=o,f=[],a=f;
|
||||
n:for(;++u<o;){var c=n[u];if(i)var l=c+"",l=Vt.call(e[0],l)?!(a=e[0][l]):a=e[0][l]=[];if(l||0>mt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=R(t[p],0,100)))(c))continue n;f.push(c)}}return f},F.invert=X,F.invoke=function(n,t){var r=G(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=At(typeof o=="number"?o:0);return ct(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},F.keys=pr,F.map=lt,F.max=pt,F.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";
|
||||
return Vt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},F.merge=et,F.min=function(n,t,r){var e=1/0,u=e;if(!t&&lr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&rt(n)?D:P(t,r),fr(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},F.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},F.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=P(t,r);else var o=Kt.apply(Rt,arguments);return ar(n,function(n,r,i){(e?!t(n,r,i):0>mt(o,r,1))&&(u[r]=n)
|
||||
}),u},F.once=function(n){var t,r;return function(){return t?r:(t=e,r=n.apply(this,arguments),n=u,r)}},F.pairs=function(n){for(var t=-1,r=pr(n),e=r.length,u=At(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},F.partial=function(n){return C(n,G(arguments,1))},F.partialRight=function(n){return C(n,G(arguments,1),u,l)},F.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=Kt.apply(Rt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];f in n&&(e[f]=n[f])}else t=P(t,r),ar(n,function(n,r,u){t(n,r,u)&&(e[r]=n)
|
||||
});return e},F.pluck=lt,F.range=function(n,t,r){n=+n||0,r=+r||1,t==u&&(t=n,n=0);var e=-1;t=nr(0,Pt((t-n)/r));for(var o=At(t);++e<t;)o[e]=n,n+=r;return o},F.reject=function(n,t,r){return t=P(t,r),ft(n,function(n,r,e){return!t(n,r,e)})},F.rest=dt,F.shuffle=function(n){var t=-1,r=n?n.length:0,e=At(typeof r=="number"?r:0);return ct(n,function(n){var r=Mt(er()*(++t+1));e[t]=e[r],e[r]=n}),e},F.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=At(typeof u=="number"?u:0);for(t=P(t,r),ct(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}
|
||||
}),u=o.length,o.sort(z);u--;)o[u]=o[u].c;return o},F.tap=function(n,t){return t(n),n},F.throttle=function(n,t){function r(){a=new kt,f=u,o=n.apply(i,e)}var e,o,i,f,a=0;return function(){var c=new kt,l=t-(c-a);return e=arguments,i=this,0<l?f||(f=Jt(r,l)):(Tt(f),f=u,a=c,o=n.apply(i,e)),o}},F.times=function(n,t,r){n=+n||0;for(var e=-1,u=At(n);++e<n;)u[e]=t.call(r,e);return u},F.toArray=function(n){return n&&typeof n.length=="number"?G(n):ut(n)},F.union=function(){return bt(Kt.apply(Rt,arguments))},F.uniq=bt,F.values=ut,F.where=ft,F.without=function(n){for(var t=-1,r=n?n.length:0,e=R(arguments,1),u=[];++t<r;){var o=n[t];
|
||||
e(o)||u.push(o)}return u},F.wrap=function(n,t){return function(){var r=[n];return Gt.apply(r,arguments),t.apply(this,r)}},F.zip=function(n){for(var t=-1,r=n?pt(lt(arguments,"length")):0,e=At(r);++t<r;)e[t]=lt(arguments,t);return e},F.collect=lt,F.drop=dt,F.each=ct,F.extend=gr,F.methods=W,F.select=ft,F.tail=dt,F.unique=bt,Ot(F),F.clone=Q,F.cloneDeep=function(n,t,r){return Q(n,e,t,r)},F.contains=ot,F.escape=function(n){return n==u?"":(n+"").replace(b,U)},F.every=it,F.find=at,F.has=function(n,t){return n?Vt.call(n,t):o
|
||||
},F.identity=xt,F.indexOf=mt,F.isArguments=J,F.isArray=lr,F.isBoolean=function(n){return n===e||n===o||Lt.call(n)==O},F.isDate=function(n){return n instanceof kt||Lt.call(n)==S},F.isElement=function(n){return n?1===n.nodeType:o},F.isEmpty=function(n){var t=e;if(!n)return t;var r=Lt.call(n),u=n.length;return r==x||r==E||r==w||r==$&&typeof u=="number"&&Z(n.splice)?!u:(cr(n,function(){return t=o}),t)},F.isEqual=Y,F.isFinite=function(n){return Xt(n)&&!Yt(parseFloat(n))},F.isFunction=Z,F.isNaN=function(n){return tt(n)&&n!=+n
|
||||
},F.isNull=function(n){return n===u},F.isNumber=tt,F.isObject=nt,F.isPlainObject=a,F.isRegExp=function(n){return n instanceof Bt||Lt.call(n)==k},F.isString=rt,F.isUndefined=function(n){return typeof n=="undefined"},F.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?nr(0,e+r):tr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},F.mixin=Ot,F.noConflict=function(){return i._=zt,this},F.parseInt=Wt,F.random=function(n,t){return n==u&&t==u&&(t=1),n=+n||0,t==u&&(t=n,n=0),n+Mt(er()*((+t||0)-n+1))
|
||||
},F.reduce=st,F.reduceRight=vt,F.result=function(n,t){var e=n?n[t]:r;return Z(e)?n[t]():e},F.runInContext=t,F.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:pr(n).length},F.some=gt,F.sortedIndex=_t,F.template=function(n,t,u){var o=F.templateSettings;n||(n=""),u=hr({},u,o);var i,f=hr({},u.imports,o.imports),o=pr(f),f=ut(f),a=0,c=u.interpolate||_,l="__p+='",c=Bt((u.escape||_).source+"|"+c.source+"|"+(c===d?m:_).source+"|"+(u.evaluate||_).source+"|$","g");n.replace(c,function(t,r,u,o,f,c){return u||(u=o),l+=n.slice(a,c).replace(j,M),r&&(l+="'+__e("+r+")+'"),f&&(i=e,l+="';"+f+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),a=c+t.length,t
|
||||
}),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(i?l.replace(v,""):l).replace(g,"$1").replace(h,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var p=Et(o,"return "+l).apply(r,f)}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},F.unescape=function(n){return n==u?"":(n+"").replace(s,H)},F.uniqueId=function(n){var t=++c;return(n==u?"":n+"")+t
|
||||
},F.all=it,F.any=gt,F.detect=at,F.foldl=st,F.foldr=vt,F.include=ot,F.inject=st,cr(F,function(n,t){F.prototype[t]||(F.prototype[t]=function(){var t=[this.__wrapped__];return Gt.apply(t,arguments),n.apply(F,t)})}),F.first=ht,F.last=function(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=o;for(t=P(t,r);i--&&t(n[i],i,n);)e++}else if(e=t,e==u||r)return n[o-1];return G(n,nr(0,o-e))}},F.take=ht,F.head=ht,cr(F,function(n,t){F.prototype[t]||(F.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);
|
||||
return t==u||r&&typeof t!="function"?e:new F(e)})}),F.VERSION="1.0.1",F.prototype.toString=function(){return this.__wrapped__+""},F.prototype.value=St,F.prototype.valueOf=St,fr(["join","pop","shift"],function(n){var t=Rt[n];F.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),fr(["push","reverse","sort","unshift"],function(n){var t=Rt[n];F.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),fr(["concat","slice","splice"],function(n){var t=Rt[n];F.prototype[n]=function(){return new F(t.apply(this.__wrapped__,arguments))
|
||||
}}),F}var r,e=!0,u=null,o=!1,i=typeof exports=="object"&&exports,f=typeof module=="object"&&module&&module.exports==i&&module,a=typeof global=="object"&&global;a.global===a&&(n=a);var c=0,l={},p=30,s=/&(?:amp|lt|gt|quot|#39);/g,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,h=/(__e\(.*?\)|\b__t\))\+'';/g,y=/\w*$/,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,d=/<%=([\s\S]+?)%>/g,_=/($^)/,b=/[&<>"']/g,j=/['\n\r\t\u2028\u2029\\]/g,w="[object Arguments]",x="[object Array]",O="[object Boolean]",S="[object Date]",A="[object Number]",$="[object Object]",k="[object RegExp]",E="[object String]",I={"[object Function]":o};
|
||||
I[w]=I[x]=I[O]=I[S]=I[A]=I[$]=I[k]=I[E]=e;var N={"boolean":o,"function":e,object:e,number:o,string:o,undefined:o},q={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=B,define(function(){return B})):i?f?(f.exports=B)._=B:i._=B:n._=B})(this);
|
||||
14
dist/lodash.underscore.js
vendored
14
dist/lodash.underscore.js
vendored
@@ -177,13 +177,13 @@
|
||||
* `union`, `uniq`, `unshift`, `values`, `where`, `without`, `wrap`, and `zip`
|
||||
*
|
||||
* The non-chainable wrapper functions are:
|
||||
* `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`, `identity`,
|
||||
* `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
|
||||
* `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`,
|
||||
* `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`,
|
||||
* `lastIndexOf`, `mixin`, `noConflict`, `pop`, `random`, `reduce`, `reduceRight`,
|
||||
* `result`, `shift`, `size`, `some`, `sortedIndex`, `template`, `unescape`,
|
||||
* `uniqueId`, and `value`
|
||||
* `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`,
|
||||
* `identity`, `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`,
|
||||
* `isElement`, `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`,
|
||||
* `isNull`, `isNumber`, `isObject`, `isPlainObject`, `isRegExp`, `isString`,
|
||||
* `isUndefined`, `join`, `lastIndexOf`, `mixin`, `noConflict`, `parseInt`,
|
||||
* `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`, `size`, `some`,
|
||||
* `sortedIndex`, `runInContext`, `template`, `unescape`, `uniqueId`, and `value`
|
||||
*
|
||||
* The wrapper functions `first` and `last` return wrapped values when `n` is
|
||||
* passed, otherwise they return unwrapped values.
|
||||
|
||||
243
doc/README.md
243
doc/README.md
@@ -139,6 +139,7 @@
|
||||
* [`_.methods`](#_functionsobject)
|
||||
* [`_.omit`](#_omitobject-callback-prop1-prop2--thisarg)
|
||||
* [`_.pairs`](#_pairsobject)
|
||||
* [`_.parseInt`](#_parseintvalue)
|
||||
* [`_.pick`](#_pickobject-callback-prop1-prop2--thisarg)
|
||||
* [`_.values`](#_valuesobject)
|
||||
|
||||
@@ -198,7 +199,7 @@
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_compactarray"></a>`_.compact(array)`
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3214 "View in source") [Ⓣ][1]
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3236 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
|
||||
|
||||
@@ -222,7 +223,7 @@ _.compact([0, 1, false, 2, '', 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_differencearray--array1-array2-"></a>`_.difference(array [, array1, array2, ...])`
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3244 "View in source") [Ⓣ][1]
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3266 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -247,7 +248,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_firstarray--callbackn-thisarg"></a>`_.first(array [, callback|n, thisArg])`
|
||||
<a href="#_firstarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3317 "View in source") [Ⓣ][1]
|
||||
<a href="#_firstarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3339 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the first element of the `array`. If a number `n` is passed, the first `n` elements of the `array` are returned. If a `callback` function is passed, elements at the beginning of the array are returned as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -307,7 +308,7 @@ _.first(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_flattenarray-shallow"></a>`_.flatten(array, shallow)`
|
||||
<a href="#_flattenarray-shallow">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3356 "View in source") [Ⓣ][1]
|
||||
<a href="#_flattenarray-shallow">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3378 "View in source") [Ⓣ][1]
|
||||
|
||||
Flattens a nested array *(the nesting can be to any depth)*. If `shallow` is truthy, `array` will only be flattened a single level.
|
||||
|
||||
@@ -335,7 +336,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value [, fromIndex=0])`
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3398 "View in source") [Ⓣ][1]
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3420 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `fromIndex` will run a faster binary search.
|
||||
|
||||
@@ -367,7 +368,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_initialarray--callbackn1-thisarg"></a>`_.initial(array [, callback|n=1, thisArg])`
|
||||
<a href="#_initialarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3472 "View in source") [Ⓣ][1]
|
||||
<a href="#_initialarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3494 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets all but the last element of `array`. If a number `n` is passed, the last `n` elements are excluded from the result. If a `callback` function is passed, elements at the end of the array are excluded from the result as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -424,7 +425,7 @@ _.initial(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3506 "View in source") [Ⓣ][1]
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3528 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -448,7 +449,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastarray--callbackn-thisarg"></a>`_.last(array [, callback|n, thisArg])`
|
||||
<a href="#_lastarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3598 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3620 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the last element of the `array`. If a number `n` is passed, the last `n` elements of the `array` are returned. If a `callback` function is passed, elements at the end of the array are returned as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments;(value, index, array).
|
||||
|
||||
@@ -505,7 +506,7 @@ _.last(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastindexofarray-value--fromindexarraylength-1"></a>`_.lastIndexOf(array, value [, fromIndex=array.length-1])`
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3639 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3661 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
|
||||
|
||||
@@ -534,7 +535,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_objectkeys--values"></a>`_.object(keys [, values=[]])`
|
||||
<a href="#_objectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3669 "View in source") [Ⓣ][1]
|
||||
<a href="#_objectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3691 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
|
||||
|
||||
@@ -559,7 +560,7 @@ _.object(['moe', 'larry'], [30, 40]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3713 "View in source") [Ⓣ][1]
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3735 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`.
|
||||
|
||||
@@ -597,7 +598,7 @@ _.range(0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_restarray--callbackn1-thisarg"></a>`_.rest(array [, callback|n=1, thisArg])`
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3792 "View in source") [Ⓣ][1]
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3814 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.initial`, this method gets all but the first value of `array`. If a number `n` is passed, the first `n` values are excluded from the result. If a `callback` function is passed, elements at the beginning of the array are excluded from the result as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -657,7 +658,7 @@ _.rest(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortedindexarray-value--callbackidentity-thisarg"></a>`_.sortedIndex(array, value [, callback=identity, thisArg])`
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3856 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3878 "View in source") [Ⓣ][1]
|
||||
|
||||
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -706,7 +707,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3888 "View in source") [Ⓣ][1]
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3910 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -730,7 +731,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqarray--issortedfalse-callbackidentity-thisarg"></a>`_.uniq(array [, isSorted=false, callback=identity, thisArg])`
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3935 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3957 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -777,7 +778,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3994 "View in source") [Ⓣ][1]
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4016 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -802,7 +803,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4025 "View in source") [Ⓣ][1]
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4047 "View in source") [Ⓣ][1]
|
||||
|
||||
Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
|
||||
|
||||
@@ -833,7 +834,7 @@ _.zip(['moe', 'larry'], [30, 40], [true, false]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_value"></a>`_(value)`
|
||||
<a href="#_value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L308 "View in source") [Ⓣ][1]
|
||||
<a href="#_value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L309 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a `lodash` object, that wraps the given `value`, to enable method chaining.
|
||||
|
||||
@@ -846,7 +847,7 @@ The chainable wrapper functions are:<br>
|
||||
`after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, `compose`, `concat`, `countBy`, `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, `forEach`, `forIn`, `forOwn`, `functions`, `groupBy`, `initial`, `intersection`, `invert`, `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `push`, `range`, `reject`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `union`, `uniq`, `unshift`, `values`, `where`, `without`, `wrap`, and `zip`
|
||||
|
||||
The non-chainable wrapper functions are:<br>
|
||||
`clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`, `identity`, `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, `lastIndexOf`, `mixin`, `noConflict`, `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `template`, `unescape`, `uniqueId`, and `value`
|
||||
`clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`, `identity`, `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, `template`, `unescape`, `uniqueId`, and `value`
|
||||
|
||||
The wrapper functions `first` and `last` return wrapped values when `n` is passed, otherwise they return unwrapped values.
|
||||
|
||||
@@ -864,7 +865,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4924 "View in source") [Ⓣ][1]
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4946 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
|
||||
|
||||
@@ -894,7 +895,7 @@ _([1, 2, 3, 4])
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypetostring"></a>`_.prototype.toString()`
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4941 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4963 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces the `toString` result of the wrapped value.
|
||||
|
||||
@@ -915,7 +916,7 @@ _([1, 2, 3]).toString();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypevalueof"></a>`_.prototype.valueOf()`
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4958 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4980 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the wrapped value.
|
||||
|
||||
@@ -946,7 +947,7 @@ _([1, 2, 3]).valueOf();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_atcollection--index1-index2-"></a>`_.at(collection [, index1, index2, ...])`
|
||||
<a href="#_atcollection--index1-index2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2215 "View in source") [Ⓣ][1]
|
||||
<a href="#_atcollection--index1-index2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2237 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements from the specified indexes, or keys, of the `collection`. Indexes may be specified as individual arguments or as arrays of indexes.
|
||||
|
||||
@@ -974,7 +975,7 @@ _.at(['moe', 'larry', 'curly'], 0, 2);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_containscollection-target--fromindex0"></a>`_.contains(collection, target [, fromIndex=0])`
|
||||
<a href="#_containscollection-target--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2257 "View in source") [Ⓣ][1]
|
||||
<a href="#_containscollection-target--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2279 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a given `target` element is present in a `collection` using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
|
||||
|
||||
@@ -1012,7 +1013,7 @@ _.contains('curly', 'ur');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_countbycollection--callbackidentity-thisarg"></a>`_.countBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_countbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2311 "View in source") [Ⓣ][1]
|
||||
<a href="#_countbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2333 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys returned from running each element of the `collection` through the given `callback`. The corresponding value of each key is the number of times the key was returned by the `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1048,7 +1049,7 @@ _.countBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_everycollection--callbackidentity-thisarg"></a>`_.every(collection [, callback=identity, thisArg])`
|
||||
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2363 "View in source") [Ⓣ][1]
|
||||
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2385 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1094,7 +1095,7 @@ _.every(stooges, { 'age': 50 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_filtercollection--callbackidentity-thisarg"></a>`_.filter(collection [, callback=identity, thisArg])`
|
||||
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2424 "View in source") [Ⓣ][1]
|
||||
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2446 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning an array of all elements the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1140,7 +1141,7 @@ _.filter(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findcollection--callbackidentity-thisarg"></a>`_.find(collection [, callback=identity, thisArg])`
|
||||
<a href="#_findcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2491 "View in source") [Ⓣ][1]
|
||||
<a href="#_findcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2513 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning the first that the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1188,7 +1189,7 @@ var healthy = _.find(food, 'organic');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_foreachcollection--callbackidentity-thisarg"></a>`_.forEach(collection [, callback=identity, thisArg])`
|
||||
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2526 "View in source") [Ⓣ][1]
|
||||
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2548 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over a `collection`, executing the `callback` for each element in the `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -1220,7 +1221,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_groupbycollection--callbackidentity-thisarg"></a>`_.groupBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2576 "View in source") [Ⓣ][1]
|
||||
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2598 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys returned from running each element of the `collection` through the `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1257,7 +1258,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invokecollection-methodname--arg1-arg2-"></a>`_.invoke(collection, methodName [, arg1, arg2, ...])`
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2609 "View in source") [Ⓣ][1]
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2631 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes the method named by `methodName` on each element in the `collection`, returning an array of the results of each invoked method. Additional arguments will be passed to each invoked method. If `methodName` is a function, it will be invoked for, and `this` bound to, each element in the `collection`.
|
||||
|
||||
@@ -1286,7 +1287,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/bestiejs/lodash/blob/master/lodash.js#L2661 "View in source") [Ⓣ][1]
|
||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2683 "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)*.
|
||||
|
||||
@@ -1331,7 +1332,7 @@ _.map(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_maxcollection--callbackidentity-thisarg"></a>`_.max(collection [, callback=identity, thisArg])`
|
||||
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2718 "View in source") [Ⓣ][1]
|
||||
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2740 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1373,7 +1374,7 @@ _.max(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mincollection--callbackidentity-thisarg"></a>`_.min(collection [, callback=identity, thisArg])`
|
||||
<a href="#_mincollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2787 "View in source") [Ⓣ][1]
|
||||
<a href="#_mincollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2809 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1415,7 +1416,7 @@ _.min(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2837 "View in source") [Ⓣ][1]
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2859 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the value of a specified property from all elements in the `collection`.
|
||||
|
||||
@@ -1445,7 +1446,7 @@ _.pluck(stooges, '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/bestiejs/lodash/blob/master/lodash.js#L2869 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2891 "View in source") [Ⓣ][1]
|
||||
|
||||
Reduces a `collection` to a value that 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 passed, 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)*.
|
||||
|
||||
@@ -1483,7 +1484,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/bestiejs/lodash/blob/master/lodash.js#L2912 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2934 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.reduce`, except that it iterates over a `collection` from right to left.
|
||||
|
||||
@@ -1514,7 +1515,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/bestiejs/lodash/blob/master/lodash.js#L2972 "View in source") [Ⓣ][1]
|
||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2994 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
|
||||
|
||||
@@ -1557,7 +1558,7 @@ _.reject(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2993 "View in source") [Ⓣ][1]
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3015 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
|
||||
|
||||
@@ -1581,7 +1582,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sizecollection"></a>`_.size(collection)`
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3026 "View in source") [Ⓣ][1]
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3048 "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.
|
||||
|
||||
@@ -1611,7 +1612,7 @@ _.size('curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_somecollection--callbackidentity-thisarg"></a>`_.some(collection [, callback=identity, thisArg])`
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3073 "View in source") [Ⓣ][1]
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3095 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds 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)*.
|
||||
|
||||
@@ -1657,7 +1658,7 @@ _.some(food, { 'type': 'meat' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortbycollection--callbackidentity-thisarg"></a>`_.sortBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3129 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3151 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements, sorted in ascending order by the results of running each element in the `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)*.
|
||||
|
||||
@@ -1694,7 +1695,7 @@ _.sortBy(['banana', 'strawberry', 'apple'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_toarraycollection"></a>`_.toArray(collection)`
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3164 "View in source") [Ⓣ][1]
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3186 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the `collection` to an array.
|
||||
|
||||
@@ -1718,7 +1719,7 @@ Converts the `collection` to an array.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3196 "View in source") [Ⓣ][1]
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3218 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning an array of all elements that have the given `properties`. When checking `properties`, this method performs a deep comparison between values to determine if they are equivalent to each other.
|
||||
|
||||
@@ -1755,7 +1756,7 @@ _.where(stooges, { 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4058 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4080 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is restricted to executing `func` only after it is called `n` times. The `func` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -1783,7 +1784,7 @@ _.forEach(notes, function(note) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindfunc--thisarg-arg1-arg2-"></a>`_.bind(func [, thisArg, arg1, arg2, ...])`
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4091 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4113 "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 passed to the bound function.
|
||||
|
||||
@@ -1814,7 +1815,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4122 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4144 "View in source") [Ⓣ][1]
|
||||
|
||||
Binds methods on `object` to `object`, 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.
|
||||
|
||||
@@ -1845,7 +1846,7 @@ jQuery('#docs').on('click', view.onClick);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindkeyobject-key--arg1-arg2-"></a>`_.bindKey(object, key [, arg1, arg2, ...])`
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4168 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4190 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed 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 http://michaux.ca/articles/lazy-function-definition-pattern.
|
||||
|
||||
@@ -1886,7 +1887,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4191 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4213 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is the composition of the passed 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.
|
||||
|
||||
@@ -1913,7 +1914,7 @@ welcome('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4224 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4246 "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. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -1939,7 +1940,7 @@ jQuery(window).on('resize', lazyLayout);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4288 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4310 "View in source") [Ⓣ][1]
|
||||
|
||||
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -1964,7 +1965,7 @@ _.defer(function() { alert('deferred'); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4268 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4290 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -1991,7 +1992,7 @@ _.delay(log, 1000, 'logged later');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4316 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4338 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function.
|
||||
|
||||
@@ -2017,7 +2018,7 @@ var fibonacci = _.memoize(function(n) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_oncefunc"></a>`_.once(func)`
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4343 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4365 "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.
|
||||
|
||||
@@ -2043,7 +2044,7 @@ initialize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4378 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4400 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `_.bind`, except it does **not** alter the `this` binding.
|
||||
|
||||
@@ -2070,7 +2071,7 @@ hi('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialrightfunc--arg1-arg2-"></a>`_.partialRight(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4409 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4431 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.partial`, except that `partial` arguments are appended to those passed to the new function.
|
||||
|
||||
@@ -2107,7 +2108,7 @@ options.imports
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4431 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4453 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
@@ -2132,7 +2133,7 @@ jQuery(window).on('scroll', throttled);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4484 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4506 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2168,7 +2169,7 @@ hello();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_assignobject--source1-source2--callback-thisarg"></a>`_.assign(object [, source1, source2, ..., callback, thisArg])`
|
||||
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1110 "View in source") [Ⓣ][1]
|
||||
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1111 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object. Subsequent sources will overwrite propery assignments of previous sources. If a `callback` function is passed, it will be executed to produce the assigned values. The `callback` is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -2206,7 +2207,7 @@ defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonevalue--deepfalse-callback-thisarg"></a>`_.clone(value [, deep=false, callback, thisArg])`
|
||||
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1165 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1166 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a clone of `value`. If `deep` is `true`, nested objects will also be cloned, otherwise they will be assigned by reference. If a `callback` function is passed, it will be executed to produce the cloned values. If `callback` returns `undefined`, cloning will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2253,7 +2254,7 @@ clone.childNodes.length;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonedeepvalue--callback-thisarg"></a>`_.cloneDeep(value [, callback, thisArg])`
|
||||
<a href="#_clonedeepvalue--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1290 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonedeepvalue--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1291 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a deep clone of `value`. If a `callback` function is passed, it will be executed to produce the cloned values. If `callback` returns the value it was passed, cloning will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2299,7 +2300,7 @@ clone.node == view.node;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_defaultsobject--source1-source2-"></a>`_.defaults(object [, source1, source2, ...])`
|
||||
<a href="#_defaultsobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1314 "View in source") [Ⓣ][1]
|
||||
<a href="#_defaultsobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1315 "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.
|
||||
|
||||
@@ -2325,7 +2326,7 @@ _.defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forinobject--callbackidentity-thisarg"></a>`_.forIn(object [, callback=identity, thisArg])`
|
||||
<a href="#_forinobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L930 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L931 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over `object`'s own and inherited enumerable properties, 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`.
|
||||
|
||||
@@ -2361,7 +2362,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forownobject--callbackidentity-thisarg"></a>`_.forOwn(object [, callback=identity, thisArg])`
|
||||
<a href="#_forownobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L955 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L956 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over an object's own enumerable properties, 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`.
|
||||
|
||||
@@ -2389,7 +2390,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_functionsobject"></a>`_.functions(object)`
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1331 "View in source") [Ⓣ][1]
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1332 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
|
||||
|
||||
@@ -2416,7 +2417,7 @@ _.functions(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_hasobject-property"></a>`_.has(object, property)`
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1356 "View in source") [Ⓣ][1]
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1357 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
||||
|
||||
@@ -2441,7 +2442,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invertobject"></a>`_.invert(object)`
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1373 "View in source") [Ⓣ][1]
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1374 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of the inverted keys and values of the given `object`.
|
||||
|
||||
@@ -2465,7 +2466,7 @@ _.invert({ 'first': 'moe', 'second': 'larry' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L891 "View in source") [Ⓣ][1]
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L892 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an `arguments` object.
|
||||
|
||||
@@ -2492,7 +2493,7 @@ _.isArguments([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L973 "View in source") [Ⓣ][1]
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L974 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an array.
|
||||
|
||||
@@ -2519,7 +2520,7 @@ _.isArray([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1399 "View in source") [Ⓣ][1]
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1400 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a boolean value.
|
||||
|
||||
@@ -2543,7 +2544,7 @@ _.isBoolean(null);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1416 "View in source") [Ⓣ][1]
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1417 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a date.
|
||||
|
||||
@@ -2567,7 +2568,7 @@ _.isDate(new Date);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1433 "View in source") [Ⓣ][1]
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1434 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a DOM element.
|
||||
|
||||
@@ -2591,7 +2592,7 @@ _.isElement(document.body);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1458 "View in source") [Ⓣ][1]
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1459 "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".
|
||||
|
||||
@@ -2621,7 +2622,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/bestiejs/lodash/blob/master/lodash.js#L1517 "View in source") [Ⓣ][1]
|
||||
<a href="#_isequala-b--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1518 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison between two values to determine if they are equivalent to each other. If `callback` is passed, it will be executed to compare values. If `callback` returns `undefined`, comparisons will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with two arguments; *(a, b)*.
|
||||
|
||||
@@ -2666,7 +2667,7 @@ _.isEqual(words, otherWords, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1698 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1699 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is, or can be coerced to, a finite number.
|
||||
|
||||
@@ -2704,7 +2705,7 @@ _.isFinite(Infinity);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1715 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1716 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a function.
|
||||
|
||||
@@ -2728,7 +2729,7 @@ _.isFunction(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1778 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1779 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `NaN`.
|
||||
|
||||
@@ -2763,7 +2764,7 @@ _.isNaN(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1800 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1801 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `null`.
|
||||
|
||||
@@ -2790,7 +2791,7 @@ _.isNull(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1817 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1818 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a number.
|
||||
|
||||
@@ -2814,7 +2815,7 @@ _.isNumber(8.4 * 5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isobjectvalue"></a>`_.isObject(value)`
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1745 "View in source") [Ⓣ][1]
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1746 "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('')`)*
|
||||
|
||||
@@ -2844,7 +2845,7 @@ _.isObject(1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1845 "View in source") [Ⓣ][1]
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1846 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a given `value` is an object created by the `Object` constructor.
|
||||
|
||||
@@ -2879,7 +2880,7 @@ _.isPlainObject({ 'name': 'moe', 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1870 "View in source") [Ⓣ][1]
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1871 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a regular expression.
|
||||
|
||||
@@ -2903,7 +2904,7 @@ _.isRegExp(/moe/);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isstringvalue"></a>`_.isString(value)`
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1887 "View in source") [Ⓣ][1]
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1888 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a string.
|
||||
|
||||
@@ -2927,7 +2928,7 @@ _.isString('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1904 "View in source") [Ⓣ][1]
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1905 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `undefined`.
|
||||
|
||||
@@ -2951,7 +2952,7 @@ _.isUndefined(void 0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_keysobject"></a>`_.keys(object)`
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L992 "View in source") [Ⓣ][1]
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L993 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property names of `object`.
|
||||
|
||||
@@ -2975,7 +2976,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mergeobject--source1-source2--callback-thisarg"></a>`_.merge(object [, source1, source2, ..., callback, thisArg])`
|
||||
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1964 "View in source") [Ⓣ][1]
|
||||
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1965 "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 propery assignments of previous sources. If a `callback` function is passed, it will be executed to produce the merged values of the destination and source properties. If `callback` returns `undefined`, merging will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -3031,7 +3032,7 @@ _.merge(food, otherFood, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_omitobject-callback-prop1-prop2--thisarg"></a>`_.omit(object, callback|[prop1, prop2, ..., thisArg])`
|
||||
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2071 "View in source") [Ⓣ][1]
|
||||
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2072 "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` function is passed, it will be executed for each property in the `object`, omitting the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3062,7 +3063,7 @@ _.omit({ 'name': 'moe', 'age': 40 }, function(value) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pairsobject"></a>`_.pairs(object)`
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2105 "View in source") [Ⓣ][1]
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2106 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
|
||||
|
||||
@@ -3083,10 +3084,36 @@ _.pairs({ 'moe': 30, 'larry': 40 });
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_parseintvalue"></a>`_.parseInt(value)`
|
||||
<a href="#_parseintvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2135 "View in source") [Ⓣ][1]
|
||||
|
||||
Parses the given `value` into an integer of the specified `radix`.
|
||||
|
||||
Note: This method avoids differences in ES3 and ES5 `parseInt` implementations. See http://es5.github.com/#E.
|
||||
|
||||
#### Arguments
|
||||
1. `value` *(Mixed)*: The value to parse.
|
||||
|
||||
#### Returns
|
||||
*(Number)*: Returns the new integer value.
|
||||
|
||||
#### Example
|
||||
```js
|
||||
_.parseInt('08');
|
||||
// => 8
|
||||
```
|
||||
|
||||
* * *
|
||||
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pickobject-callback-prop1-prop2--thisarg"></a>`_.pick(object, callback|[prop1, prop2, ..., thisArg])`
|
||||
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2143 "View in source") [Ⓣ][1]
|
||||
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2165 "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 `callback` is passed, it will be executed for each property in the `object`, picking the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3117,7 +3144,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_valuesobject"></a>`_.values(object)`
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2180 "View in source") [Ⓣ][1]
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2202 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property values of `object`.
|
||||
|
||||
@@ -3148,7 +3175,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4508 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4530 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -3172,7 +3199,7 @@ _.escape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4526 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4548 "View in source") [Ⓣ][1]
|
||||
|
||||
This function returns the first argument passed to it.
|
||||
|
||||
@@ -3197,7 +3224,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4552 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4574 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -3227,7 +3254,7 @@ _('moe').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4576 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4598 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -3247,7 +3274,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4599 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4621 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
|
||||
|
||||
@@ -3275,7 +3302,7 @@ _.random(5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4637 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4659 "View in source") [Ⓣ][1]
|
||||
|
||||
Resolves the value of `property` on `object`. If `property` is a function, it will be invoked and its result returned, else the property value is returned. If `object` is falsey, then `null` is returned.
|
||||
|
||||
@@ -3328,7 +3355,7 @@ Create a new `lodash` function using the given `context` object.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4725 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4747 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -3412,7 +3439,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback [, thisArg])`
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4850 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4872 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
|
||||
|
||||
@@ -3444,7 +3471,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unescapestring"></a>`_.unescape(string)`
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4876 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4898 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -3468,7 +3495,7 @@ _.unescape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4896 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4918 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
|
||||
|
||||
@@ -3502,7 +3529,7 @@ _.uniqueId();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsimports_"></a>`_.templateSettings.imports._`
|
||||
<a href="#_templatesettingsimports_">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L377 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsimports_">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L378 "View in source") [Ⓣ][1]
|
||||
|
||||
A reference to the `lodash` function.
|
||||
|
||||
@@ -3521,7 +3548,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5127 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5150 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
@@ -3533,7 +3560,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettings"></a>`_.templateSettings`
|
||||
<a href="#_templatesettings">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L329 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettings">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L330 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Object)*: By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby *(ERB)*. Change the following template settings to use alternative delimiters.
|
||||
|
||||
@@ -3545,7 +3572,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsescape"></a>`_.templateSettings.escape`
|
||||
<a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L337 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L338 "View in source") [Ⓣ][1]
|
||||
|
||||
*(RegExp)*: Used to detect `data` property values to be HTML-escaped.
|
||||
|
||||
@@ -3557,7 +3584,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsevaluate"></a>`_.templateSettings.evaluate`
|
||||
<a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L345 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L346 "View in source") [Ⓣ][1]
|
||||
|
||||
*(RegExp)*: Used to detect code to be evaluated.
|
||||
|
||||
@@ -3569,7 +3596,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsinterpolate"></a>`_.templateSettings.interpolate`
|
||||
<a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L353 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L354 "View in source") [Ⓣ][1]
|
||||
|
||||
*(RegExp)*: Used to detect `data` property values to inject.
|
||||
|
||||
@@ -3581,7 +3608,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsvariable"></a>`_.templateSettings.variable`
|
||||
<a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L361 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L362 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: Used to reference the data object in the template text.
|
||||
|
||||
@@ -3593,7 +3620,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsimports"></a>`_.templateSettings.imports`
|
||||
<a href="#_templatesettingsimports">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L369 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsimports">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L370 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Object)*: Used to import variables into the compiled template.
|
||||
|
||||
|
||||
38
lodash.js
38
lodash.js
@@ -169,6 +169,7 @@
|
||||
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min,
|
||||
nativeParseInt = context.parseInt,
|
||||
nativeRandom = Math.random;
|
||||
|
||||
/** Detect various environments */
|
||||
@@ -288,13 +289,13 @@
|
||||
* `union`, `uniq`, `unshift`, `values`, `where`, `without`, `wrap`, and `zip`
|
||||
*
|
||||
* The non-chainable wrapper functions are:
|
||||
* `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`, `identity`,
|
||||
* `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
|
||||
* `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`,
|
||||
* `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`,
|
||||
* `lastIndexOf`, `mixin`, `noConflict`, `pop`, `random`, `reduce`, `reduceRight`,
|
||||
* `result`, `shift`, `size`, `some`, `sortedIndex`, `template`, `unescape`,
|
||||
* `uniqueId`, and `value`
|
||||
* `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`,
|
||||
* `identity`, `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`,
|
||||
* `isElement`, `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`,
|
||||
* `isNull`, `isNumber`, `isObject`, `isPlainObject`, `isRegExp`, `isString`,
|
||||
* `isUndefined`, `join`, `lastIndexOf`, `mixin`, `noConflict`, `parseInt`,
|
||||
* `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`, `size`, `some`,
|
||||
* `sortedIndex`, `runInContext`, `template`, `unescape`, `uniqueId`, and `value`
|
||||
*
|
||||
* The wrapper functions `first` and `last` return wrapped values when `n` is
|
||||
* passed, otherwise they return unwrapped values.
|
||||
@@ -2115,6 +2116,27 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the given `value` into an integer of the specified `radix`.
|
||||
*
|
||||
* Note: This method avoids differences in ES3 and ES5 `parseInt`
|
||||
* implementations. See http://es5.github.com/#E.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Mixed} value The value to parse.
|
||||
* @returns {Number} Returns the new integer value.
|
||||
* @example
|
||||
*
|
||||
* _.parseInt('08');
|
||||
* // => 8
|
||||
*/
|
||||
var parseInt = nativeParseInt('08') == 8 ? nativeParseInt : function(value, radix) {
|
||||
// Firefox and Opera have not changed to the ES5 specified implementation of `parseInt`
|
||||
return nativeParseInt(isString(value) ? value.replace(/^0+(?=.$)/, '') : value, radix || 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a shallow clone of `object` composed of the specified properties.
|
||||
* Property names may be specified as individual arguments or as arrays of property
|
||||
@@ -4666,7 +4688,6 @@
|
||||
* interpolate - The "interpolate" delimiter regexp.
|
||||
* sourceURL - The sourceURL of the template's compiled source.
|
||||
* variable - The data object variable name.
|
||||
*
|
||||
* @returns {Function|String} Returns a compiled function when no `data` object
|
||||
* is given, else it returns the interpolated text.
|
||||
* @example
|
||||
@@ -5063,6 +5084,7 @@
|
||||
lodash.lastIndexOf = lastIndexOf;
|
||||
lodash.mixin = mixin;
|
||||
lodash.noConflict = noConflict;
|
||||
lodash.parseInt = parseInt;
|
||||
lodash.random = random;
|
||||
lodash.reduce = reduce;
|
||||
lodash.reduceRight = reduceRight;
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
'merge',
|
||||
'omit',
|
||||
'pairs',
|
||||
'parseInt',
|
||||
'pick',
|
||||
'values'
|
||||
];
|
||||
@@ -291,6 +292,7 @@
|
||||
'forOwn',
|
||||
'isPlainObject',
|
||||
'merge',
|
||||
'parseInt',
|
||||
'partialRight',
|
||||
'runInContext'
|
||||
]));
|
||||
|
||||
16
test/test.js
16
test/test.js
@@ -1767,6 +1767,22 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.parseInt');
|
||||
|
||||
(function() {
|
||||
test('should parse strings with leading zeros with a `radix` of 10 by default (test in Firefox and Opera)', function() {
|
||||
equal(_.parseInt('08'), 8);
|
||||
});
|
||||
|
||||
test('should internally use a radix of 10 if `radix` is `undefined` or `0`', function() {
|
||||
equal(_.parseInt('10', 0), 10);
|
||||
equal(_.parseInt('10'), 10);
|
||||
equal(_.parseInt('10', undefined), 10);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('partial methods');
|
||||
|
||||
_.each(['partial', 'partialRight'], function(methodName) {
|
||||
|
||||
Reference in New Issue
Block a user