mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Update test configs and move builds.
Former-commit-id: dc14112821f14101f107f90e9aeb5abec55b18a6
This commit is contained in:
4646
dist/lodash.js
vendored
Normal file
4646
dist/lodash.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
39
dist/lodash.min.js
vendored
Normal file
39
dist/lodash.min.js
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 1.0.0-rc.3 (Custom Build) lodash.com/license
|
||||
* Build: `lodash strict modern -o ./dist/lodash.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n,t){"use strict";function r(n){if(!n||typeof n!="object")return W;var t=n.valueOf,r=typeof t=="function"&&(r=_t(t))&&_t(r);if(r)n=n==r||_t(n)==r&&!h(n);else{var e=W;!n||typeof n!="object"||h(n)?n=e:(t=n.constructor,!w(t)||t instanceof t?(Yt(n,function(n,t){e=t}),n=e===W||bt.call(n,e)):n=e)}return n}function e(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof e?(this.__wrapped__=n,void 0):new e(n)}function u(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||et);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";
|
||||
(bt.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return bt.call(o,e)&&-1<P(o[e],r)}return-1<P(n,r,t)}}function o(n){return n.charCodeAt(0)}function i(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=v(a),e?a.concat(r):r.concat(a)):r),this instanceof u?(s.prototype=n.prototype,c=new s,s.prototype=Q,a=n.apply(c,a),j(a)?a:c):n.apply(c,a)
|
||||
}var o=w(n),i=!r,f=t;return i&&(r=t),o||(t=n),u}function a(n,r,e){if(!n)return G;var u=typeof n;if("function"!=u){if("object"!=u)return function(t){return t[n]};var o=tr(n);return function(r){for(var e=o.length,u=W;e--&&(u=b(r[o[e]],n[o[e]],t,t,rt)););return u}}return typeof r!="undefined"?1===e?function(t){return n.call(r,t)}:2===e?function(t,e){return n.call(r,t,e)}:4===e?function(t,e,u,o){return n.call(r,t,e,u,o)}:function(t,e,u){return n.call(r,t,e,u)}:n}function c(){for(var n,t={g:Ut,b:"k(m)",c:"",h:"",l:"",m:L},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="'use strict';var i,m="+t.d+",u=m;if(!m)return u;"+t.l+";",t.b&&(r+="var n=m.length;i=-1;if("+t.b+"){while(++i<n){"+t.h+"}}else{"),t.g&&t.m?r+="var r=-1,s=q[typeof m]?o(m):[],n=s.length;while(++r<n){i=s[r];"+t.h+"}":(r+="for(i in m){",t.m&&(r+="if(",t.m&&(r+="h.call(m,i)"),r+="){"),r+=t.h+";",t.m&&(r+="}"),r+="}"),t.b&&(r+="}"),r+=t.c+";return u",Function("e,h,j,k,l,q,o,t","return function("+n+"){"+r+"}")(a,bt,h,nr,A,Ht,qt,jt)}function l(n){return"\\"+Jt[n]}function p(n){return rr[n]
|
||||
}function s(){}function v(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Array(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function g(n){return er[n]}function h(n){return xt.call(n)==$t}function y(n){var t=[];return Zt(n,function(n,r){t.push(r)}),t}function m(n,r,e,u,o,i){var f=n;if(typeof r=="function"&&(u=e,e=r,r=W),typeof e=="function"){e=typeof u=="undefined"?e:a(e,u,1);var f=e(f),c=typeof f!="undefined";c||(f=n)}if(u=j(f)){var l=xt.call(f);if(!Vt[l])return f;var p=nr(f)
|
||||
}if(!u||!r)return u&&!c?p?v(f):ur({},f):f;switch(u=Gt[l],l){case Dt:case Tt:return c?f:new u(+f);case Bt:case zt:return c?f:new u(f);case Mt:return c?f:u(f.source,ct.exec(f))}for(o||(o=[]),i||(i=[]),l=o.length;l--;)if(o[l]==n)return i[l];return c||(f=p?u(f.length):{},p&&(bt.call(n,"index")&&(f.index=n.index),bt.call(n,"input")&&(f.input=n.input))),o.push(n),i.push(f),(p?R:Zt)(c?f:n,function(n,u){f[u]=m(n,r,e,t,o,i)}),f}function d(n){var t=[];return Yt(n,function(n,r){w(n)&&t.push(r)}),t.sort()}function _(n){for(var t=-1,r=tr(n),e=r.length,u={};++t<e;){var o=r[t];
|
||||
u[n[o]]=o}return u}function b(n,r,e,u,o,i,f){if(e){e=typeof u=="undefined"?e:a(e,u,2);var c=e(n,r);if(typeof c!="undefined")return!!c}if(n===r)return 0!==n||1/n==1/r;u=typeof n;var l=typeof r;if(n===n&&(!n||"function"!=u&&"object"!=u)&&(!r||"function"!=l&&"object"!=l))return W;if(l=xt.call(n),u=xt.call(r),l==$t&&(l=It),u==$t&&(u=It),l!=u)return W;switch(l){case Dt:case Tt:return+n==+r;case Bt:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case Mt:case zt:return n==r+""}if(u=l==Ft,!u){if(n.__wrapped__||r.__wrapped__)return b(n.__wrapped__||n,r.__wrapped__||r,e,t,o,i,f);
|
||||
if(l!=It)return W;var l=n.constructor,p=r.constructor;if(l!=p&&(!w(l)||!(l instanceof l&&w(p)&&p instanceof p)))return W}for(i||(i=[]),f||(f=[]),l=i.length;l--;)if(i[l]==n)return f[l]==r;var s=0,c=L;if(i.push(n),f.push(r),u){if(s=r.length,c=o==rt||s==n.length)for(;s--&&(c=b(n[s],r[s],e,t,o,i,f)););return c}return Yt(r,function(r,u,a){return bt.call(a,u)?(s++,c=bt.call(n,u)&&b(n[u],r,e,t,o,i,f)):void 0}),c&&o!=rt&&Yt(n,function(n,t,r){return bt.call(r,t)?c=-1<--s:void 0}),c}function w(n){return typeof n=="function"
|
||||
}function j(n){return n?Ht[typeof n]:W}function x(n){return typeof n=="number"||xt.call(n)==Bt}function A(n){return typeof n=="string"||xt.call(n)==zt}function O(n,t,e){var u=arguments,o=0,i=2;if(!j(n))return n;if(e===rt)var f=u[3],c=u[4],l=u[5];else c=[],l=[],typeof e!="number"&&(i=u.length,f=typeof(f=u[i-2])=="function"?a(f,u[--i],2):typeof(f=u[i-1])=="function"&&f);for(;++o<i;)(nr(u[o])?R:Zt)(u[o],function(t,e){var u,o,i=t,a=n[e];if(t&&((o=nr(t))||r(t))){for(i=c.length;i--;)if(u=c[i]==t){a=l[i];
|
||||
break}u||(a=o?nr(a)?a:[]:r(a)?a:{},f&&(i=f(a,t),typeof i!="undefined"&&(a=i)),c.push(t),l.push(a),f||(a=O(a,t,rt,f,c,l)))}else f&&(i=f(a,t),typeof i=="undefined"&&(i=t)),typeof i!="undefined"&&(a=i);n[e]=a});return n}function E(n){for(var t=-1,r=tr(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function S(n,t,r){var e=-1,u=n?n.length:0,o=W;return r=(0>r?kt(0,u+r):r)||0,typeof u=="number"?o=-1<(A(n)?n.indexOf(t,r):P(n,t,r)):Xt(n,function(n){return++e<r?void 0:!(o=n===t)}),o}function q(n,t,r){var e=L;
|
||||
if(t=a(t,r),nr(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else Xt(n,function(n,r,u){return e=!!t(n,r,u)});return e}function k(n,t,r){var e=[];if(t=a(t,r),nr(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else Xt(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function N(n,t,r){var e;return t=a(t,r),R(n,function(n,r,u){return t(n,r,u)?(e=n,W):void 0}),e}function R(n,t,r){if(t&&typeof r=="undefined"&&nr(n)){r=-1;for(var e=n.length;++r<e&&t(n[r],r,n)!==W;);}else Xt(n,t,r);
|
||||
return n}function $(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0);if(t=a(t,r),nr(n))for(;++e<u;)o[e]=t(n[e],e,n);else Xt(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function F(n,t,r){var e=-1/0,u=e;if(!t&&nr(n)){r=-1;for(var i=n.length;++r<i;){var f=n[r];f>u&&(u=f)}}else t=!t&&A(n)?o:a(t,r),Xt(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function D(n,t){return $(n,t+"")}function T(n,t,r,e){var u=3>arguments.length;if(t=a(t,e,4),nr(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)
|
||||
}else Xt(n,function(n,e,o){r=u?(u=W,n):t(r,n,e,o)});return r}function B(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=tr(n),u=i.length;return t=a(t,e,4),R(n,function(e,f,a){f=i?i[--u]:--u,r=o?(o=W,n[f]):t(r,n[f],f,a)}),r}function I(n,t,r){var e;if(t=a(t,r),nr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else Xt(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function M(n,t,r){if(n){var e=0,u=n.length;if(typeof t=="function"){var o=-1;for(t=a(t,r);++o<u&&t(n[o],o,n);)e++
|
||||
}else if(e=t,e==Q||r)return n[0];return v(n,0,Nt(kt(0,e),u))}}function z(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];nr(o)?wt.apply(u,t?o:z(o)):u.push(o)}return u}function P(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?kt(0,u+r):r||0)-1;else if(r)return e=K(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function C(n,t,r){if(typeof t=="function"){var e=0,u=-1,o=n?n.length:0;for(t=a(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==Q||r?1:kt(0,t);return v(n,e)}function K(n,t,r,e){var u=0,o=n?n.length:u;
|
||||
for(r=r?a(r,e,1):G,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function U(n,t,r,e){var u=-1,o=n?n.length:0,i=[],f=i;typeof t=="function"&&(e=r,r=t,t=W);var c=!t&&75<=o;if(c)var l={};for(r&&(f=[],r=a(r,e));++u<o;){e=n[u];var p=r?r(e,u,n):e;if(c)var s=p+"",s=bt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>P(f,p))&&((r||c)&&f.push(p),i.push(e))}return i}function V(n,t){return Kt||At&&2<arguments.length?At.call.apply(At,arguments):f(n,t,v(arguments,2))}function G(n){return n}function H(n){R(d(n),function(t){var r=e[t]=n[t];
|
||||
e.prototype[t]=function(){var n=[this.__wrapped__];return wt.apply(n,arguments),new e(r.apply(e,n))}})}function J(){return this.__wrapped__}var L=!0,Q=null,W=!1,X=typeof exports=="object"&&exports,Y=typeof global=="object"&&global;Y.global===Y&&(n=Y);var Z=[],nt={},tt=0,rt=nt,et=30,ut=n._,ot=/&(?:amp|lt|gt|quot|#x27);/g,it=/\b__p\+='';/g,ft=/\b(__p\+=)''\+/g,at=/(__e\(.*?\)|\b__t\))\+'';/g,ct=/\w*$/,lt=RegExp("^"+(nt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),pt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,st=/<%=([\s\S]+?)%>/g,vt=/($^)/,gt=/[&<>"']/g,ht=/['\n\r\t\u2028\u2029\\]/g,yt=Math.ceil,mt=Z.concat,dt=Math.floor,_t=lt.test(_t=Object.getPrototypeOf)&&_t,bt=nt.hasOwnProperty,wt=Z.push,jt=nt.propertyIsEnumerable,xt=nt.toString,At=lt.test(At=v.bind)&&At,Ot=lt.test(Ot=Array.isArray)&&Ot,Et=n.isFinite,St=n.isNaN,qt=lt.test(qt=Object.keys)&&qt,kt=Math.max,Nt=Math.min,Rt=Math.random,$t="[object Arguments]",Ft="[object Array]",Dt="[object Boolean]",Tt="[object Date]",Bt="[object Number]",It="[object Object]",Mt="[object RegExp]",zt="[object String]",Pt=!!n.attachEvent,Ct=At&&!/\n|true/.test(At+Pt),Kt=At&&!Ct,Ut=qt&&(Pt||Ct),Vt={"[object Function]":W};
|
||||
Vt[$t]=Vt[Ft]=Vt[Dt]=Vt[Tt]=Vt[Bt]=Vt[It]=Vt[Mt]=Vt[zt]=L;var Gt={};Gt[Ft]=Array,Gt[Dt]=Boolean,Gt[Tt]=Date,Gt[It]=Object,Gt[Bt]=Number,Gt[Mt]=RegExp,Gt[zt]=String;var Ht={"boolean":W,"function":L,object:L,number:W,string:W,undefined:W},Jt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};e.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:st,variable:"",imports:{_:e}};var Lt={a:"p,w,g",l:"var a=0,b=typeof g=='number'?2:arguments.length;while(++a<b){m=arguments[a];if(m&&q[typeof m]){",h:"u[i]=m[i]",c:"}}"},Qt={a:"d,c,x",l:"c=c&&typeof x=='undefined'?c:e(c,x)",b:"typeof n=='number'",h:"if(c(m[i],i,d)===false)return u"},Wt={l:"if(!q[typeof m])return u;"+Qt.l,b:W},Xt=c(Qt),Yt=c(Qt,Wt,{m:W}),Zt=c(Qt,Wt),nr=Ot||function(n){return n instanceof Array||xt.call(n)==Ft
|
||||
},tr=qt?function(n){return j(n)?qt(n):[]}:y,rr={"&":"&","<":"<",">":">",'"':""","'":"'"},er=_(rr),ur=c(Lt),or=c(Lt,{h:"if(u[i]==null)"+Lt.h});w(/x/)&&(w=function(n){return n instanceof Function||"[object Function]"==xt.call(n)}),e.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},e.assign=ur,e.at=function(n){for(var t=-1,r=mt.apply(Z,v(arguments,1)),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u},e.bind=V,e.bindAll=function(n){for(var t=mt.apply(Z,arguments),r=1<t.length?0:(t=d(n),-1),e=t.length;++r<e;){var u=t[r];
|
||||
n[u]=V(n[u],n)}return n},e.bindKey=function(n,t){return f(n,t,v(arguments,2))},e.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},e.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},e.countBy=function(n,t,r){var e={};return t=a(t,r),R(n,function(n,r,u){r=t(n,r,u)+"",bt.call(e,r)?e[r]++:e[r]=1}),e},e.debounce=function(n,t,r){function e(){f=Q,r||(o=n.apply(i,u))}var u,o,i,f;return function(){var a=r&&!f;
|
||||
return u=arguments,i=this,clearTimeout(f),f=setTimeout(e,t),a&&(o=n.apply(i,u)),o}},e.defaults=or,e.defer=function(n){var r=v(arguments,1);return setTimeout(function(){n.apply(t,r)},1)},e.delay=function(n,r){var e=v(arguments,2);return setTimeout(function(){n.apply(t,e)},r)},e.difference=function(n){for(var t=-1,r=n?n.length:0,e=mt.apply(Z,arguments),e=u(e,r),o=[];++t<r;){var i=n[t];e(i)||o.push(i)}return o},e.filter=k,e.flatten=z,e.forEach=R,e.forIn=Yt,e.forOwn=Zt,e.functions=d,e.groupBy=function(n,t,r){var e={};
|
||||
return t=a(t,r),R(n,function(n,r,u){r=t(n,r,u)+"",(bt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},e.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t=="function"){var o=u;for(t=a(t,r);o--&&t(n[o],o,n);)e++}else e=t==Q||r?1:t||e;return v(n,0,Nt(kt(0,u-e),u))},e.intersection=function(n){var t=arguments,r=t.length,e={0:{}},o=-1,i=n?n.length:0,f=100<=i,a=[],c=a;n:for(;++o<i;){var l=n[o];if(f)var p=l+"",p=bt.call(e[0],p)?!(c=e[0][p]):c=e[0][p]=[];if(p||0>P(c,l)){f&&c.push(l);for(var s=r;--s;)if(!(e[s]||(e[s]=u(t[s],0,100)))(l))continue n;
|
||||
a.push(l)}}return a},e.invert=_,e.invoke=function(n,t){var r=v(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return R(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},e.keys=tr,e.map=$,e.max=F,e.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return bt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},e.merge=O,e.min=function(n,t,r){var e=1/0,u=e;if(!t&&nr(n)){r=-1;for(var i=n.length;++r<i;){var f=n[r];f<u&&(u=f)
|
||||
}}else t=!t&&A(n)?o:a(t,r),Xt(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},e.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},e.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=a(t,r);else var o=mt.apply(Z,arguments);return Yt(n,function(n,r,i){(e?!t(n,r,i):0>P(o,r,1))&&(u[r]=n)}),u},e.once=function(n){var t,r;return function(){return t?r:(t=L,r=n.apply(this,arguments),n=Q,r)}},e.pairs=function(n){for(var t=-1,r=tr(n),e=r.length,u=Array(e);++t<e;){var o=r[t];
|
||||
u[t]=[o,n[o]]}return u},e.partial=function(n){return f(n,v(arguments,1))},e.partialRight=function(n){return f(n,v(arguments,1),Q,rt)},e.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=mt.apply(Z,arguments),i=j(n)?o.length:0;++u<i;){var f=o[u];f in n&&(e[f]=n[f])}else t=a(t,r),Yt(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},e.pluck=D,e.range=function(n,t,r){n=+n||0,r=+r||1,t==Q&&(t=n,n=0);var e=-1;t=kt(0,yt((t-n)/r));for(var u=Array(t);++e<t;)u[e]=n,n+=r;return u},e.reject=function(n,t,r){return t=a(t,r),k(n,function(n,r,e){return!t(n,r,e)
|
||||
})},e.rest=C,e.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return R(n,function(n){var r=dt(Rt()*(++t+1));e[t]=e[r],e[r]=n}),e},e.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0);for(t=a(t,r),R(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(i);u--;)o[u]=o[u].c;return o},e.tap=function(n,t){return t(n),n},e.throttle=function(n,t){function r(){f=new Date,i=Q,u=n.apply(o,e)}var e,u,o,i,f=0;return function(){var a=new Date,c=t-(a-f);
|
||||
return e=arguments,o=this,0<c?i||(i=setTimeout(r,c)):(clearTimeout(i),i=Q,f=a,u=n.apply(o,e)),u}},e.times=function(n,t,r){n=+n||0;for(var e=-1,u=Array(n);++e<n;)u[e]=t.call(r,e);return u},e.toArray=function(n){return n&&typeof n.length=="number"?v(n):E(n)},e.union=function(){return U(mt.apply(Z,arguments))},e.uniq=U,e.values=E,e.where=function(n,t){return k(n,t)},e.without=function(n){for(var t=-1,r=n?n.length:0,e=u(arguments,1),o=[];++t<r;){var i=n[t];e(i)||o.push(i)}return o},e.wrap=function(n,t){return function(){var r=[n];
|
||||
return wt.apply(r,arguments),t.apply(this,r)}},e.zip=function(n){for(var t=-1,r=n?F(D(arguments,"length")):0,e=Array(r);++t<r;)e[t]=D(arguments,t);return e},e.collect=$,e.drop=C,e.each=R,e.extend=ur,e.methods=d,e.select=k,e.tail=C,e.unique=U,H(e),e.clone=m,e.cloneDeep=function(n,t,r){return m(n,L,t,r)},e.contains=S,e.escape=function(n){return n==Q?"":(n+"").replace(gt,p)},e.every=q,e.find=N,e.has=function(n,t){return n?bt.call(n,t):W},e.identity=G,e.indexOf=P,e.isArguments=h,e.isArray=nr,e.isBoolean=function(n){return n===L||n===W||xt.call(n)==Dt
|
||||
},e.isDate=function(n){return n instanceof Date||xt.call(n)==Tt},e.isElement=function(n){return n?1===n.nodeType:W},e.isEmpty=function(n){var t=L;if(!n)return t;var r=xt.call(n),e=n.length;return r==Ft||r==zt||r==$t||r==It&&typeof e=="number"&&w(n.splice)?!e:(Zt(n,function(){return t=W}),t)},e.isEqual=b,e.isFinite=function(n){return Et(n)&&!St(parseFloat(n))},e.isFunction=w,e.isNaN=function(n){return x(n)&&n!=+n},e.isNull=function(n){return n===Q},e.isNumber=x,e.isObject=j,e.isPlainObject=r,e.isRegExp=function(n){return n instanceof RegExp||xt.call(n)==Mt
|
||||
},e.isString=A,e.isUndefined=function(n){return typeof n=="undefined"},e.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?kt(0,e+r):Nt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},e.mixin=H,e.noConflict=function(){return n._=ut,this},e.random=function(n,t){return n==Q&&t==Q&&(t=1),n=+n||0,t==Q&&(t=n,n=0),n+dt(Rt()*((+t||0)-n+1))},e.reduce=T,e.reduceRight=B,e.result=function(n,r){var e=n?n[r]:t;return w(e)?n[r]():e},e.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:tr(n).length
|
||||
},e.some=I,e.sortedIndex=K,e.template=function(n,r,u){var o=e.templateSettings;n||(n=""),u=or({},u,o);var i,f=or({},u.imports,o.imports),o=tr(f),f=E(f),a=0,c=u.interpolate||vt,p="__p+='";n.replace(RegExp((u.escape||vt).source+"|"+c.source+"|"+(c===st?pt:vt).source+"|"+(u.evaluate||vt).source+"|$","g"),function(t,r,e,u,o,f){return e||(e=u),p+=n.slice(a,f).replace(ht,l),r&&(p+="'+__e("+r+")+'"),o&&(i=L,p+="';"+o+";__p+='"),e&&(p+="'+((__t=("+e+"))==null?'':__t)+'"),a=f+t.length,t}),p+="';\n",c=u=u.variable,c||(u="obj",p="with("+u+"){"+p+"}"),p=(i?p.replace(it,""):p).replace(ft,"$1").replace(at,"$1;"),p="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(c?"":",__d="+u+"."+u+"||"+u)+";")+p+"return __p}";
|
||||
try{var s=Function(o,"return "+p).apply(t,f)}catch(v){throw v.source=p,v}return r?s(r):(s.source=p,s)},e.unescape=function(n){return n==Q?"":(n+"").replace(ot,g)},e.uniqueId=function(n){var t=++tt;return(n==Q?"":n+"")+t},e.all=q,e.any=I,e.detect=N,e.foldl=T,e.foldr=B,e.include=S,e.inject=T,Zt(e,function(n,t){e.prototype[t]||(e.prototype[t]=function(){var t=[this.__wrapped__];return wt.apply(t,arguments),n.apply(e,t)})}),e.first=M,e.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t=="function"){var o=u;
|
||||
for(t=a(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,e==Q||r)return n[u-1];return v(n,kt(0,u-e))}},e.take=M,e.head=M,Zt(e,function(n,t){e.prototype[t]||(e.prototype[t]=function(t,r){var u=n(this.__wrapped__,t,r);return t==Q||r&&typeof t!="function"?u:new e(u)})}),e.VERSION="1.0.0-rc.3",e.prototype.toString=function(){return this.__wrapped__+""},e.prototype.value=J,e.prototype.valueOf=J,Xt(["join","pop","shift"],function(n){var t=Z[n];e.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}
|
||||
}),Xt(["push","reverse","sort","unshift"],function(n){var t=Z[n];e.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Xt(["concat","slice","splice"],function(n){var t=Z[n];e.prototype[n]=function(){return new e(t.apply(this.__wrapped__,arguments))}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=e,define(function(){return e})):X?typeof module=="object"&&module&&module.exports==X?(module.exports=e)._=e:X._=e:n._=e})(this);
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 1.0.0-rc.3 (Custom Build) <http://lodash.com/>
|
||||
* Build: `lodash underscore -d -o ./lodash.underscore.js`
|
||||
* Build: `lodash underscore -d -o ./dist/lodash.underscore.js`
|
||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.4.4 <http://underscorejs.org/>
|
||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 1.0.0-rc.3 (Custom Build) lodash.com/license
|
||||
* Build: `lodash underscore -m -o ./lodash.underscore.min.js`
|
||||
* Build: `lodash underscore -m -o ./dist/lodash.underscore.min.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n,t){function r(n,t){var r;if(n&&Tt[typeof n])for(r in t||(t=G),n)if(t(n[r],r,n)===nt)break}function e(n,t,r){if(n){t=t&&typeof r=="undefined"?t:a(t,r);var e=n.length;if(r=-1,typeof e=="number")for(;++r<e&&t(n[r],r,n)!==nt;);else for(r in n)if(lt.call(n,r)&&t(n[r],r,n)===nt)break}}function u(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof u?(this.__wrapped__=n,void 0):new u(n)}function o(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
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "1.0.0-rc.3",
|
||||
"description": "An alternative to Underscore.js, delivering consistency, customization, performance, and extra features.",
|
||||
"homepage": "http://lodash.com",
|
||||
"main": "./lodash",
|
||||
"main": "./dist/lodash",
|
||||
"keywords": [
|
||||
"browser",
|
||||
"client",
|
||||
@@ -47,6 +47,6 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./build.js",
|
||||
"test": "node ./test/test.js && node ./test/test.js ./lodash.min.js && node ./test/test-build.js"
|
||||
"test": "node ./test/test.js ./dist/lodash.js && node ./test/test.js ./dist/lodash.min.js && node ./test/test-build.js"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ cd "$(dirname "$0")"
|
||||
for cmd in rhino ringo narwhal node; do
|
||||
echo ""
|
||||
echo "Testing in $cmd..."
|
||||
$cmd test.js
|
||||
$cmd test.js && $cmd test.js ../lodash.min.js
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
ui.buildPath = (function() {
|
||||
switch (build) {
|
||||
case 'lodash-prod': return 'lodash.min.js';
|
||||
case 'lodash-underscore': return 'lodash.underscore.min.js';
|
||||
case 'lodash-underscore': return 'dist/lodash.underscore.min.js';
|
||||
case 'lodash-modern': return 'dist/lodash.min.js';
|
||||
case 'lodash-modern-debug': return 'dist/lodash.js';
|
||||
case 'lodash-custom': return 'lodash.custom.min.js';
|
||||
case 'lodash-custom-debug': return 'lodash.custom.js';
|
||||
}
|
||||
@@ -58,8 +60,10 @@
|
||||
switch (build) {
|
||||
case 'lodash-prod': return 1;
|
||||
case 'lodash-underscore': return 2;
|
||||
case 'lodash-custom': return 3;
|
||||
case 'lodash-custom-debug': return 4;
|
||||
case 'lodash-modern': return 3;
|
||||
case 'lodash-modern-debug': return 4;
|
||||
case 'lodash-custom': return 5;
|
||||
case 'lodash-custom-debug': return 6;
|
||||
}
|
||||
return 0;
|
||||
}());
|
||||
@@ -86,6 +90,8 @@
|
||||
'<option value="lodash-dev">Developement</option>' +
|
||||
'<option value="lodash-prod">Production</option>' +
|
||||
'<option value="lodash-underscore">Underscore</option>' +
|
||||
'<option value="lodash-modern">Modern</option>' +
|
||||
'<option value="lodash-modern-debug">Modern (debug)</option>' +
|
||||
'<option value="lodash-custom">Custom</option>' +
|
||||
'<option value="lodash-custom-debug">Custom (debug)</option>' +
|
||||
'</select>';
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
var QUnit =
|
||||
window.QUnit || (
|
||||
window.addEventListener || (window.addEventListener = Function.prototype),
|
||||
window.setTimeout || (window.setTimeout = Function.prototype),
|
||||
window.setTimeout || (window.setTimeout = / /),
|
||||
window.QUnit = load('../vendor/qunit/qunit/qunit.js') || window.QUnit,
|
||||
load('../vendor/qunit-clib/qunit-clib.js'),
|
||||
window.addEventListener === Function.prototype && delete window.addEventListener,
|
||||
@@ -609,7 +609,7 @@
|
||||
|
||||
test('lodash.' + methodName + ' should not throw strict mode errors', function() {
|
||||
var object = { 'a': null, 'b': function(){} },
|
||||
pass = true;
|
||||
pass = !/dist\/lodash(\.min)?\.js/.test(typeof ui != 'undefined' ? ui.buildPath : filePath);
|
||||
|
||||
if (freeze) {
|
||||
freeze(object);
|
||||
@@ -620,7 +620,7 @@
|
||||
func(object, { 'a': 1 });
|
||||
}
|
||||
} catch(e) {
|
||||
pass = false;
|
||||
pass = !pass;
|
||||
}
|
||||
ok(pass);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user