mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
38 lines
17 KiB
JavaScript
38 lines
17 KiB
JavaScript
/**
|
|
* @license
|
|
* Lo-Dash 1.3.1 (Custom Build) lodash.com/license | Underscore.js 1.5.1 underscorejs.org/LICENSE
|
|
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
|
*/
|
|
;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function r(n,r){var t=n.l,e=r.l;if(t!==e){if(t>e||typeof t=="undefined")return 1;if(t<e||typeof e=="undefined")return-1}return n.m-r.m}function t(n){return"\\"+vr[n]}function e(){}function u(n){return n instanceof u?n:new i(n)}function i(n,r){this.__chain__=!!r,this.__wrapped__=n}function o(n,r,t){if(typeof n!="function")return L;if(typeof r=="undefined")return n;switch(t){case 1:return function(t){return n.call(r,t)
|
|
};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,i){return n.call(r,t,e,u,i)}}return H(n,r)}function f(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,i=[];++e<u;){var o=n[e];o&&typeof o=="object"&&(Cr(o)||y(o))?Ar.apply(i,r?o:f(o,r,t)):t||i.push(o)}return i}function a(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(n===n&&!(n&&sr[typeof n]||r&&sr[typeof r]))return!1;if(null==n||null==r)return n===r;var i=Tr.call(n),o=Tr.call(r);
|
|
if(i!=o)return!1;switch(i){case or:case fr:return+n==+r;case ar:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case cr:case pr:return n==r+""}if(o=i==ir,!o){if(Er.call(n,"__wrapped__")||r instanceof u)return a(n.__wrapped__||n,r.__wrapped__||r,t,e);if(i!=lr)return!1;var i=n.constructor,f=r.constructor;if(i!=f&&!(j(i)&&i instanceof i&&j(f)&&f instanceof f))return!1}for(t||(t=[]),e||(e=[]),i=t.length;i--;)if(t[i]==n)return e[i]==r;var l=!0,c=0;if(t.push(n),e.push(r),o){if(c=r.length,l=c==n.length)for(;c--&&(l=a(n[c],r[c],t,e)););return l
|
|
}return Kr(r,function(r,u,i){return Er.call(i,u)?(c++,!(l=Er.call(n,u)&&a(n[u],r,t,e))&&nr):void 0}),l&&Kr(n,function(n,r,t){return Er.call(t,r)?!(l=-1<--c)&&nr:void 0}),l}function l(n,r,t){for(var e=-1,u=h(),i=n?n.length:0,o=[],f=t?[]:o;++e<i;){var a=n[e],l=t?t(a,e,n):a;(r?!e||f[f.length-1]!==l:0>u(f,l))&&(t&&f.push(l),o.push(a))}return o}function c(n){return function(r,t,e){var u={};t=J(t,e,3),e=-1;var i=r?r.length:0;if(typeof i=="number")for(;++e<i;){var o=r[e];n(u,o,t(o,e,r),r)}else Lr(r,function(r,e,i){n(u,r,t(r,e,i),i)
|
|
});return u}}function p(n,r,t,e,u,i){var o=1&r,f=2&r,a=4&r,l=8&r,c=16&r,v=32&r,h=n;if(!f&&!j(n))throw new TypeError;if(c&&!t.length&&(r&=-17,c=t=!1),v&&!e.length&&(r&=-33,v=e=!1),!o||f||a||v||!(zr.fastBind||Sr&&c))y=function(){var g=arguments,m=o?u:this;return c&&Or.apply(g,t),v&&Ar.apply(g,e),a&&g.length<i?(r|=16,p(n,l?r:-4&r,g,null,u,i)):(f&&(n=m[h]),this instanceof y?(m=s(n.prototype),g=n.apply(m,g),x(g)?g:m):n.apply(m,g))};else{if(c){var g=[u];Ar.apply(g,t)}var y=c?Sr.apply(n,g):Sr.call(n,u)}return y
|
|
}function s(n){return x(n)?Fr(n):{}}function v(n){return Vr[n]}function h(){var r=(r=u.indexOf)===P?n:r;return r}function g(n){return Gr[n]}function y(n){return n&&typeof n=="object"?Tr.call(n)==ur:!1}function m(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n}function _(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)"undefined"==typeof n[u]&&(n[u]=e[u])}return n}function d(n){var r=[];
|
|
return Kr(n,function(n,t){j(n)&&r.push(t)}),r.sort()}function b(n){for(var r=-1,t=Ur(n),e=t.length,u={};++r<e;){var i=t[r];u[n[i]]=i}return u}function w(n){if(!n)return!0;if(Cr(n)||A(n))return!n.length;for(var r in n)if(Er.call(n,r))return!1;return!0}function j(n){return typeof n=="function"}function x(n){return!(!n||!sr[typeof n])}function E(n){return typeof n=="number"||Tr.call(n)==ar}function A(n){return typeof n=="string"||Tr.call(n)==pr}function T(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];
|
|
return u}function O(n,r){var t=h(),e=n?n.length:0,u=!1;return e&&typeof e=="number"?u=-1<t(n,r):Lr(n,function(n){return(u=n===r)&&nr}),u}function S(n,r,t){var e=!0;r=J(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else Lr(n,function(n,t,u){return!(e=!!r(n,t,u))&&nr});return e}function F(n,r,t){var e=[];r=J(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var i=n[t];r(i,t,n)&&e.push(i)}else Lr(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function N(n,r,t){r=J(r,t,3),t=-1;
|
|
var e=n?n.length:0;if(typeof e!="number"){var u;return Lr(n,function(n,t,e){return r(n,t,e)?(u=n,nr):void 0}),u}for(;++t<e;){var i=n[t];if(r(i,t,n))return i}}function R(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:o(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==nr;);else Lr(n,r)}function B(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&false!==r(n[t],t,n););else{var e=Ur(n),t=e.length;Lr(n,function(n,u,i){return u=e?e[--t]:--t,false===r(i[u],u,i)&&nr})}}function D(n,r,t){var e=-1,u=n?n.length:0;
|
|
if(r=J(r,t,3),typeof u=="number")for(var i=Array(u);++e<u;)i[e]=r(n[e],e,n);else i=[],Lr(n,function(n,t,u){i[++e]=r(n,t,u)});return i}function k(n,r,t){var e=-1/0,u=e,i=-1,o=n?n.length:0;if(r||typeof o!="number")r=J(r,t,3),R(n,function(n,t,i){t=r(n,t,i),t>e&&(e=t,u=n)});else for(;++i<o;)t=n[i],t>u&&(u=t);return u}function q(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++t<e;)u[t]=n[t][r];return u||D(n,r)}function M(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=o(r,e,4);
|
|
var i=-1,f=n.length;if(typeof f=="number")for(u&&(t=n[++i]);++i<f;)t=r(t,n[i],i,n);else Lr(n,function(n,e,i){t=u?(u=!1,n):r(t,n,e,i)});return t}function $(n,r,t,e){var u=3>arguments.length;return r=o(r,e,4),B(n,function(n,e,i){t=u?(u=!1,n):r(t,n,e,i)}),t}function I(n,r,t){var e;r=J(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else Lr(n,function(n,t,u){return(e=r(n,t,u))&&nr});return!!e}function W(n,r,t){return t&&w(r)?Y:(t?N:F)(n,r)}function z(n){for(var r=-1,t=h(),e=n.length,u=f(arguments,!0,!0,1),i=[];++r<e;){var o=n[r];
|
|
0>t(u,o)&&i.push(o)}return i}function C(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&null!=r){var i=-1;for(r=J(r,t,3);++i<u&&r(n[i],i,n);)e++}else if(e=r,null==e||t)return n[0];return $r.call(n,0,qr(kr(0,e),u))}}function P(r,t,e){if(typeof e=="number"){var u=r?r.length:0;e=0>e?kr(0,u+e):e||0}else if(e)return e=V(r,t),r[e]===t?e:-1;return n(r,t,e)}function U(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,i=n?n.length:0;for(r=J(r,t,3);++u<i&&r(n[u],u,n);)e++}else e=null==r||t?1:kr(0,r);
|
|
return $r.call(n,e)}function V(n,r,t,e){var u=0,i=n?n.length:u;for(t=t?J(t,e,1):L,r=t(r);u<i;)e=u+i>>>1,t(n[e])<r?u=e+1:i=e;return u}function G(n,r,t,e){return typeof r!="boolean"&&null!=r&&(t=(e=t)&&e[r]===n?Y:r,r=!1),null!=t&&(t=J(t,e,3)),l(n,r,t)}function H(n,r){return 2<arguments.length?p(n,17,$r.call(arguments,2),null,r):p(n,1,null,null,r)}function J(n,r,t){var e=typeof n;if(null==n||"function"==e)return o(n,r,t);if("object"!=e)return function(r){return r[n]};var u=Ur(n);return function(r){for(var t=u.length,e=!1;t--&&(e=r[u[t]]===n[u[t]]););return e
|
|
}}function K(n,r,t){var e,u,i,o,f=0,a=0,l=!1,c=null,p=null,s=!0;if(!j(n))throw new TypeError;if(r=kr(0,r||0),true===t)var v=!0,s=!1;else x(t)&&(v=t.leading,l="maxWait"in t&&kr(r,t.maxWait||0),s="trailing"in t?t.trailing:s);var h=function(){var t=r-(new Date-i);0<t?p=setTimeout(h,t):(t=s&&(!v||1<f),c&&clearTimeout(c),f=0,c=p=null,t&&(a=+new Date,u=n.apply(o,e)))},g=function(){p&&clearTimeout(p),f=0,c=p=null,(s||l!==r)&&(a=+new Date,u=n.apply(o,e))};return function(){if(e=arguments,i=+new Date,o=this,f++,false===l)v&&2>f&&(u=n.apply(o,e));
|
|
else{c||v||(a=i);var t=l-(i-a);0<t?c||(c=setTimeout(g,t)):(c&&(clearTimeout(c),c=null),a=i,u=n.apply(o,e))}return p||r===l||(p=setTimeout(h,r)),u}}function L(n){return n}function Q(n){R(d(n),function(r){var t=u[r]=n[r];u.prototype[r]=function(){var n=[this.__wrapped__];return Ar.apply(n,arguments),n=t.apply(u,n),this.__chain__&&(n=new i(n),n.__chain__=!0),n}})}function X(n,r){null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0;var t=Mr();return n%1||r%1?n+qr(t*(r-n+parseFloat("1e-"+((t+"").length-1))),r):n+xr(t*(r-n+1))
|
|
}var Y,Z=0,nr={},rr=+new Date+"",tr=/($^)/,er=/['\n\r\t\u2028\u2029\\]/g,ur="[object Arguments]",ir="[object Array]",or="[object Boolean]",fr="[object Date]",ar="[object Number]",lr="[object Object]",cr="[object RegExp]",pr="[object String]",sr={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},vr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},hr=sr[typeof window]&&window||this,gr=sr[typeof exports]&&exports,yr=sr[typeof module]&&module&&module.exports==gr&&module,mr=sr[typeof global]&&global;
|
|
!mr||mr.global!==mr&&mr.window!==mr||(hr=mr);var _r=[],dr=Object.prototype,br=hr._,wr=RegExp("^"+(dr.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),jr=Math.ceil,xr=Math.floor,Er=dr.hasOwnProperty,Ar=_r.push,Tr=dr.toString,Or=_r.unshift,Sr=wr.test(Sr=Tr.bind)&&Sr,Fr=wr.test(Fr=Object.create)&&Fr,Nr=wr.test(Nr=Array.isArray)&&Nr,Rr=hr.isFinite,Br=hr.isNaN,Dr=wr.test(Dr=Object.keys)&&Dr,kr=Math.max,qr=Math.min,Mr=Math.random,$r=_r.slice,Ir=wr.test(hr.attachEvent),Wr=Sr&&!/\n|true/.test(Sr+Ir);
|
|
i.prototype=u.prototype;var zr={};!function(){var n={0:1,length:1};zr.fastBind=Sr&&!Wr,zr.spliceObjects=(_r.splice.call(n,0,1),!n[0])}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Fr||(s=function(n){if(x(n)){e.prototype=n;var r=new e;e.prototype=null}return r||{}}),y(arguments)||(y=function(n){return n&&typeof n=="object"?Er.call(n,"callee"):!1});var Cr=Nr||function(n){return n&&typeof n=="object"?Tr.call(n)==ir:!1},Pr=function(n){var r,t=[];
|
|
if(!n||!sr[typeof n])return t;for(r in n)Er.call(n,r)&&t.push(r);return t},Ur=Dr?function(n){return x(n)?Dr(n):[]}:Pr,Vr={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Gr=b(Vr),Hr=RegExp("("+Ur(Gr).join("|")+")","g"),Jr=RegExp("["+Ur(Vr).join("")+"]","g"),Kr=function(n,r){var t;if(!n||!sr[typeof n])return n;for(t in n)if(r(n[t],t,n)===nr)break;return n},Lr=function(n,r){var t;if(!n||!sr[typeof n])return n;for(t in n)if(Er.call(n,t)&&r(n[t],t,n)===nr)break;return n};j(/x/)&&(j=function(n){return typeof n=="function"&&"[object Function]"==Tr.call(n)
|
|
});var Qr=c(function(n,r,t){Er.call(n,t)?n[t]++:n[t]=1}),Xr=c(function(n,r,t){(Er.call(n,t)?n[t]:n[t]=[]).push(r)});u.after=function(n,r){if(!j(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=H,u.bindAll=function(n){for(var r=1<arguments.length?f(arguments,!0,!1,1):d(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=p(n[u],1,null,null,n)}return n},u.chain=function(n){return n=new i(n),n.__chain__=!0,n},u.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];
|
|
u&&e.push(u)}return e},u.compose=function(){for(var n=arguments,r=n.length||1;r--;)if(!j(n[r]))throw new TypeError;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},u.countBy=Qr,u.debounce=K,u.defaults=_,u.defer=function(n){if(!j(n))throw new TypeError;var r=$r.call(arguments,1);return setTimeout(function(){n.apply(Y,r)},1)},u.delay=function(n,r){if(!j(n))throw new TypeError;var t=$r.call(arguments,2);return setTimeout(function(){n.apply(Y,t)},r)},u.difference=z,u.filter=F,u.flatten=function(n,r){return f(n,r)
|
|
},u.forEach=R,u.functions=d,u.groupBy=Xr,u.initial=function(n,r,t){if(!n)return[];var e=0,u=n.length;if(typeof r!="number"&&null!=r){var i=u;for(r=J(r,t,3);i--&&r(n[i],i,n);)e++}else e=null==r||t?1:r||e;return $r.call(n,0,qr(kr(0,u-e),u))},u.intersection=function(n){var r=arguments,t=r.length,e=-1,u=h(),i=n?n.length:0,o=[];n:for(;++e<i;){var f=n[e];if(0>u(o,f)){for(var a=t;--a;)if(0>u(r[a],f))continue n;o.push(f)}}return o},u.invert=b,u.invoke=function(n,r){var t=$r.call(arguments,2),e=-1,u=typeof r=="function",i=n?n.length:0,o=Array(typeof i=="number"?i:0);
|
|
return R(n,function(n){o[++e]=(u?r:n[r]).apply(n,t)}),o},u.keys=Ur,u.map=D,u.max=k,u.memoize=function(n,r){var t={};return function(){var e=rr+(r?r.apply(this,arguments):arguments[0]);return Er.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},u.min=function(n,r,t){var e=1/0,u=e,i=-1,o=n?n.length:0;if(r||typeof o!="number")r=J(r,t,3),R(n,function(n,t,i){t=r(n,t,i),t<e&&(e=t,u=n)});else for(;++i<o;)t=n[i],t<u&&(u=t);return u},u.omit=function(n){var r=h(),t=f(arguments,!0,!1,1),e={};return Kr(n,function(n,u){0>r(t,u)&&(e[u]=n)
|
|
}),e},u.once=function(n){var r,t;if(!j(n))throw new TypeError;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},u.pairs=function(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++r<e;){var i=t[r];u[r]=[i,n[i]]}return u},u.partial=function(n){return p(n,16,$r.call(arguments,1))},u.pick=function(n){for(var r=-1,t=f(arguments,!0,!1,1),e=t.length,u={};++r<e;){var i=t[r];i in n&&(u[i]=n[i])}return u},u.pluck=q,u.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=kr(0,jr((r-n)/t));
|
|
for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},u.reject=function(n,r,t){return r=J(r,t,3),F(n,function(n,t,e){return!r(n,t,e)})},u.rest=U,u.shuffle=function(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return R(n,function(n){var t=X(++r);e[r]=e[t],e[t]=n}),e},u.sortBy=function(n,t,e){var u=-1,i=n?n.length:0,o=Array(typeof i=="number"?i:0);for(t=J(t,e,3),R(n,function(n,r,e){o[++u]={l:t(n,r,e),m:u,n:n}}),i=o.length,o.sort(r);i--;)o[i]=o[i].n;return o},u.tap=function(n,r){return r(n),n
|
|
},u.throttle=function(n,r,t){var e=!0,u=!0;return false===t?e=!1:x(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,K(n,r,t)},u.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);for(r=o(r,t,1);++e<n;)u[e]=r(e);return u},u.toArray=function(n){return Cr(n)?$r.call(n):n&&typeof n.length=="number"?D(n):T(n)},u.union=function(){return l(f(arguments,!0,!0))},u.uniq=G,u.values=T,u.where=W,u.without=function(n){return z(n,$r.call(arguments,1))},u.wrap=function(n,r){if(!j(r))throw new TypeError;
|
|
return function(){var t=[n];return Ar.apply(t,arguments),r.apply(this,t)}},u.zip=function(){for(var n=-1,r=k(q(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=q(arguments,n);return t},u.collect=D,u.drop=U,u.each=R,u.extend=m,u.methods=d,u.object=function(n,r){for(var t=-1,e=n?n.length:0,u={};++t<e;){var i=n[t];r?u[i]=r[t]:i&&(u[i[0]]=i[1])}return u},u.select=F,u.tail=U,u.unique=G,u.clone=function(n){return x(n)?Cr(n)?$r.call(n):m({},n):n},u.contains=O,u.escape=function(n){return null==n?"":(n+"").replace(Jr,v)
|
|
},u.every=S,u.find=N,u.has=function(n,r){return n?Er.call(n,r):!1},u.identity=L,u.indexOf=P,u.isArguments=y,u.isArray=Cr,u.isBoolean=function(n){return true===n||false===n||Tr.call(n)==or},u.isDate=function(n){return n?typeof n=="object"&&Tr.call(n)==fr:!1},u.isElement=function(n){return n?1===n.nodeType:!1},u.isEmpty=w,u.isEqual=function(n,r){return a(n,r)},u.isFinite=function(n){return Rr(n)&&!Br(parseFloat(n))},u.isFunction=j,u.isNaN=function(n){return E(n)&&n!=+n},u.isNull=function(n){return null===n
|
|
},u.isNumber=E,u.isObject=x,u.isRegExp=function(n){return n&&sr[typeof n]?Tr.call(n)==cr:!1},u.isString=A,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?kr(0,e+t):qr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},u.mixin=Q,u.noConflict=function(){return hr._=br,this},u.random=X,u.reduce=M,u.reduceRight=$,u.result=function(n,r){var t=n?n[r]:Y;return j(t)?n[r]():t},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Ur(n).length
|
|
},u.some=I,u.sortedIndex=V,u.template=function(n,r,e){var i=u,o=i.templateSettings;n||(n=""),e=_({},e,o);var f=0,a="__p+='",o=e.variable;n.replace(RegExp((e.escape||tr).source+"|"+(e.interpolate||tr).source+"|"+(e.evaluate||tr).source+"|$","g"),function(r,e,u,i,o){return a+=n.slice(f,o).replace(er,t),e&&(a+="'+_.escape("+e+")+'"),i&&(a+="';"+i+";__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=o+r.length,r}),a+="';\n",o||(o="obj",a="with("+o+"||{}){"+a+"}"),a="function("+o+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";
|
|
try{var l=Function("_","return "+a)(i)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Hr,g)},u.uniqueId=function(n){var r=++Z+"";return n?n+r:r},u.all=S,u.any=I,u.detect=N,u.findWhere=function(n,r){return W(n,r,!0)},u.foldl=M,u.foldr=$,u.include=O,u.inject=M,u.first=C,u.last=function(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&null!=r){var i=u;for(r=J(r,t,3);i--&&r(n[i],i,n);)e++}else if(e=r,null==e||t)return n[u-1];return $r.call(n,kr(0,u-e))
|
|
}},u.take=C,u.head=C,Q(u),u.VERSION="1.3.1",u.prototype.chain=function(){return this.__chain__=!0,this},u.prototype.value=function(){return this.__wrapped__},R("pop push reverse shift sort splice unshift".split(" "),function(n){var r=_r[n];u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),zr.spliceObjects||0!==n.length||delete n[0],this}}),R(["concat","join","slice"],function(n){var r=_r[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=!0),n
|
|
}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(hr._=u, define(function(){return u})):gr&&!gr.nodeType?yr?(yr.exports=u)._=u:gr._=u:hr._=u}).call(this); |