diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index d4c091ce0..9805c96d8 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -155,18 +155,18 @@ /** Detect free variable `exports` */ var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; - /** Detect free variable `module` */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect the popular CommonJS extension `module.exports` */ - var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; - /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ var freeGlobal = objectTypes[typeof global] && global; if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { root = freeGlobal; } + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + /*--------------------------------------------------------------------------*/ /** @@ -6560,8 +6560,8 @@ * @param {RegExp} [options.evaluate] The "evaluate" delimiter. * @param {Object} [options.imports] An object to import into the template as local variables. * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [sourceURL] The sourceURL of the template's compiled source. - * @param {string} [variable] The data object variable name. + * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. + * @param {string} [options.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 diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index ec2dd4ea0..dc7f47890 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -9,7 +9,7 @@ return u}function g(r){function v(n){return n&&typeof n=="object"&&!Gr(n)&&Or.call(n,"__wrapped__")?n:new y(n)}function y(n,t){this.__chain__=!!t,this.__wrapped__=n}function _(n){function t(){if(e){var n=s(e);Er.apply(n,arguments)}if(this instanceof t){var o=Z(r.prototype),n=r.apply(o,n||arguments);return Et(n)?n:o}return r.apply(u,n||arguments)}var r=n[0],e=n[2],u=n[4];return Ur(t,n),t}function X(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o}if(!Et(n))return n;var a=br.call(n);if(!G[a]||!Vr.nodeClass&&l(n))return n; var f=Kr[a];switch(a){case B:case L:return new f(+n);case K:case U:return new f(n);case V:return o=f(n.source,O.exec(n)),o.lastIndex=n.lastIndex,o}if(a=Gr(n),t){var p=!e;e||(e=i()),u||(u=i());for(var g=e.length;g--;)if(e[g]==n)return u[g];o=a?f(n.length):{}}else o=a?s(n):bt({},n);return a&&(Or.call(n,"index")&&(o.index=n.index),Or.call(n,"input")&&(o.input=n.input)),t?(e.push(n),u.push(o),(a?ut:wt)(n,function(n,a){o[a]=X(n,t,r,e,u)}),p&&(c(e),c(u)),o):o}function Z(n){return Et(n)?Pr(n):{}}function nt(n,t,r){if(typeof n!="function")return Yt; if(typeof t=="undefined"||!("prototype"in n))return n;var e=n.__bindData__;if(typeof e=="undefined"&&(Vr.funcNames&&(e=!n.name),e=e||!Vr.funcDecomp,!e)){var u=Cr.call(n);Vr.funcNames||(e=!E.test(u)),e||(e=T.test(u),Ur(n,e))}if(false===e||true!==e&&1&e[1])return n;switch(r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)}}return Qt(n,t)}function tt(n){function t(){var n=f?a:this; -if(u){var h=s(u);Er.apply(h,arguments)}return(o||c)&&(h||(h=s(arguments)),o&&Er.apply(h,o),c&&h.length=b&&a===n,l=[];if(f){var c=o(e);c?(a=t,e=c):f=false}for(;++ua(e,c)&&l.push(c);return f&&p(e),l}function ut(n,t,r){var e=-1,u=n,o=n?n.length:0; +if(u){var h=s(u);Er.apply(h,arguments)}return(o||c)&&(h||(h=s(arguments)),o&&Er.apply(h,o),c&&h.length=b&&a===n,l=[];if(f){var c=o(e);c?(a=t,e=c):f=false}for(;++ua(e,c)&&l.push(c);return f&&p(e),l}function ut(n,t,r){var e=-1,u=n,o=n?n.length:0; if(t=t&&typeof r=="undefined"?t:nt(t,r,3),typeof o=="number")for(Vr.unindexedChars&&It(u)&&(u=u.split(""));++e>>1,r(n[e])r?0:r);++t=h;m?(u&&(u=jr(u)),c=a,o=n.apply(i,e)):u||(u=Ir(y,h))}return m&&f?f=jr(f):f||t===p||(f=Ir(v,t)),r&&(m=true,o=n.apply(i,e)),!m||f||u||(e=i=null),o}}function Yt(n){return n}function Zt(n,t,r){var e=true,u=t&&xt(t);t&&(r||u.length)||(null==r&&(r=t),o=y,t=n,n=v,u=xt(t)),false===r?e=false:Et(r)&&"chain"in r&&(e=r.chain); -var o=n,a=Ot(o);Dt(u,function(r){var u=n[r]=t[r];a&&(o.prototype[r]=function(){var t=this.__chain__,r=this.__wrapped__,a=[r];if(Er.apply(a,arguments),a=u.apply(n,a),e||t){if(r===a&&Et(a))return this;a=new o(a),a.__chain__=t}return a})})}function nr(){}function tr(n){return function(t){return t[n]}}function rr(){return this.__wrapped__}r=r?et.defaults(Y.Object(),r,et.pick(Y,D)):Y;var er=r.Array,ur=r.Boolean,or=r.Date,ar=r.Function,ir=r.Math,fr=r.Number,lr=r.Object,cr=r.RegExp,pr=r.String,sr=r.TypeError,gr=[],hr=r.Error.prototype,vr=lr.prototype,yr=pr.prototype,mr=(mr=r.window)&&mr.document,dr=r._,br=vr.toString,_r=cr("^"+pr(br).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wr=ir.ceil,jr=r.clearTimeout,xr=ir.floor,Cr=ar.prototype.toString,kr=vt(kr=lr.getPrototypeOf)&&kr,Or=vr.hasOwnProperty,Er=gr.push,Sr=vr.propertyIsEnumerable,Ir=r.setTimeout,Ar=gr.splice,Nr=gr.unshift,Rr=function(){try{var n={},t=vt(t=lr.defineProperty)&&t,r=t(n,n,n)&&t +var o=n,a=Ot(o);Dt(u,function(r){var u=n[r]=t[r];a&&(o.prototype[r]=function(){var t=this.__chain__,r=this.__wrapped__,a=[r];if(Er.apply(a,arguments),a=u.apply(n,a),e||t){if(r===a&&Et(a))return this;a=new o(a),a.__chain__=t}return a})})}function nr(){}function tr(n){return function(t){return t[n]}}function rr(){return this.__wrapped__}r=r?rt.defaults(Y.Object(),r,rt.pick(Y,D)):Y;var er=r.Array,ur=r.Boolean,or=r.Date,ar=r.Function,ir=r.Math,fr=r.Number,lr=r.Object,cr=r.RegExp,pr=r.String,sr=r.TypeError,gr=[],hr=r.Error.prototype,vr=lr.prototype,yr=pr.prototype,mr=(mr=r.window)&&mr.document,dr=r._,br=vr.toString,_r=cr("^"+pr(br).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wr=ir.ceil,jr=r.clearTimeout,xr=ir.floor,Cr=ar.prototype.toString,kr=vt(kr=lr.getPrototypeOf)&&kr,Or=vr.hasOwnProperty,Er=gr.push,Sr=vr.propertyIsEnumerable,Ir=r.setTimeout,Ar=gr.splice,Nr=gr.unshift,Rr=function(){try{var n={},t=vt(t=lr.defineProperty)&&t,r=t(n,n,n)&&t }catch(e){}return r}(),Tr=vt(Tr=yr.contains)&&Tr,Pr=vt(Pr=lr.create)&&Pr,Dr=vt(Dr=er.isArray)&&Dr,$r=r.isFinite,Fr=r.isNaN,qr=vt(qr=lr.keys)&&qr,Br=ir.max,Lr=ir.min,Wr=r.parseInt,zr=ir.random,Kr={};Kr[q]=er,Kr[B]=ur,Kr[L]=or,Kr[z]=ar,Kr[M]=lr,Kr[K]=fr,Kr[V]=cr,Kr[U]=pr;var Mr={};Mr[q]=Mr[L]=Mr[K]={constructor:true,toLocaleString:true,toString:true,valueOf:true},Mr[B]=Mr[U]={constructor:true,toString:true,valueOf:true},Mr[W]=Mr[z]=Mr[V]={constructor:true,toString:true},Mr[M]={constructor:true},function(){for(var n=$.length;n--;){var t,r=$[n]; for(t in Mr)Or.call(Mr,t)&&!Or.call(Mr[t],r)&&(Mr[t][r]=false)}}(),y.prototype=v.prototype;var Vr=v.support={};!function(){var n=function(){this.x=1},t={0:1,length:1},e=[];n.prototype={valueOf:1,y:1};for(var u in new n)e.push(u);for(u in arguments);Vr.argsClass=br.call(arguments)==F,Vr.argsObject=arguments.constructor==lr&&!(arguments instanceof er),Vr.enumErrorProps=Sr.call(hr,"message")||Sr.call(hr,"name"),Vr.enumPrototypes=Sr.call(n,"prototype"),Vr.funcDecomp=!vt(r.WinRTError)&&T.test(g),Vr.funcNames=typeof ar.name=="string",Vr.nonEnumArgs=0!=u,Vr.nonEnumShadows=!/valueOf/.test(e),Vr.ownLast="x"!=e[0],Vr.spliceObjects=(gr.splice.call(t,0,1),!t[0]),Vr.unindexedChars="xx"!="x"[0]+lr("x")[0]; try{Vr.dom=11===mr.createDocumentFragment().nodeType}catch(o){Vr.dom=false}try{Vr.nodeClass=!(br.call(undefined)==M&&!({toString:0}+""))}catch(a){Vr.nodeClass=true}}(1),v.templateSettings={escape:S,evaluate:I,interpolate:A,variable:"",imports:{_:v}},Pr||(Z=function(){function n(){}return function(t){if(Et(t)){n.prototype=t;var e=new n;n.prototype=null}return e||r.Object()}}());var Ur=Rr?function(n,t){J.value=t,Rr(n,"__bindData__",J)}:nr;Vr.argsClass||(dt=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Or.call(n,"callee")&&!Sr.call(n,"callee")||false @@ -37,16 +37,16 @@ Vr.dom||(kt=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!te(n)||fa },ie=8==Wr(w+"08")?Wr:function(n,t){return Wr(It(n)?n.replace(N,""):n,t||0)};return v.after=function(n,t){if(!Ot(t))throw new sr;return function(){return 1>--n?t.apply(this,arguments):void 0}},v.assign=bt,v.at=function(n){var t=arguments,r=-1,e=ot(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:e.length,u=er(t);for(Vr.unindexedChars&&It(n)&&(n=n.split(""));++r=b&&o(e?r[e]:s))) }var l=r[0],h=-1,v=l?l.length:0,y=[];n:for(;++h(m?t(m,g):f(s,g))){for(e=u,(m||s).push(g);--e;)if(m=a[e],0>(m?t(m,g):f(r[e],g)))continue n;y.push(g)}}for(;u--;)(m=a[u])&&p(m);return c(a),c(s),y},v.invert=Ct,v.invoke=function(n,t){var r=s(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,a=er(typeof o=="number"?o:0);return Dt(n,function(n){a[++e]=(u?t:n[t]).apply(n,r)}),a},v.keys=Jr,v.map=Ft,v.mapValues=function(n,t,r){var e={};return t=v.createCallback(t,r,3),wt(n,function(n,r,u){e[r]=t(n,r,u) }),e},v.max=qt,v.memoize=function(n,t){if(!Ot(n))throw new sr;var r=function(){var e=r.cache,u=t?t.apply(this,arguments):d+arguments[0];return Or.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return r.cache={},r},v.merge=function(n){var t=arguments,r=2;if(!Et(n))return n;if("number"!=typeof t[2]&&(r=t.length),3/g,I=/<%([\s\S]+?)%>/g,A=/<%=([\s\S]+?)%>/g,N=RegExp("^["+w+"]*0+(?=.$)"),R=/($^)/,T=/\bthis\b/,P=/['\n\r\t\u2028\u2029\\]/g,D="Array Boolean Date Error Function Math Number Object RegExp String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),$="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),F="[object Arguments]",q="[object Array]",B="[object Boolean]",L="[object Date]",W="[object Error]",z="[object Function]",K="[object Number]",M="[object Object]",V="[object RegExp]",U="[object String]",G={}; -G[z]=false,G[F]=G[q]=G[B]=G[L]=G[K]=G[M]=G[V]=G[U]=true;var H={leading:false,maxWait:0,trailing:false},J={configurable:false,enumerable:false,value:null,writable:false},Q={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},X={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Y=Q[typeof window]&&window||this,Z=Q[typeof exports]&&exports&&!exports.nodeType&&exports,nt=Q[typeof module]&&module&&!module.nodeType&&module,tt=nt&&nt.exports===Z&&Z,rt=Q[typeof global]&&global; -!rt||rt.global!==rt&&rt.window!==rt||(Y=rt);var et=g();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Y._=et, define(function(){return et})):Z&&nt?tt?(nt.exports=et)._=et:Z._=et:Y._=et}).call(this); \ No newline at end of file +G[z]=false,G[F]=G[q]=G[B]=G[L]=G[K]=G[M]=G[V]=G[U]=true;var H={leading:false,maxWait:0,trailing:false},J={configurable:false,enumerable:false,value:null,writable:false},Q={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},X={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Y=Q[typeof window]&&window||this,Z=Q[typeof exports]&&exports&&!exports.nodeType&&exports,nt=Q[typeof global]&&global;!nt||nt.global!==nt&&nt.window!==nt||(Y=nt);var tt=(nt=Q[typeof module]&&module&&!module.nodeType&&module)&&nt.exports===Z&&Z,rt=g(); +typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Y._=rt, define(function(){return rt})):Z&&nt?tt?(nt.exports=rt)._=rt:Z._=rt:Y._=rt}).call(this); \ No newline at end of file diff --git a/dist/lodash.js b/dist/lodash.js index 47d9060c3..85b66cd38 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -145,18 +145,18 @@ /** Detect free variable `exports` */ var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; - /** Detect free variable `module` */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect the popular CommonJS extension `module.exports` */ - var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; - /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ var freeGlobal = objectTypes[typeof global] && global; if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { root = freeGlobal; } + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + /*--------------------------------------------------------------------------*/ /** @@ -6242,8 +6242,8 @@ * @param {RegExp} [options.evaluate] The "evaluate" delimiter. * @param {Object} [options.imports] An object to import into the template as local variables. * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [sourceURL] The sourceURL of the template's compiled source. - * @param {string} [variable] The data object variable name. + * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. + * @param {string} [options.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 diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 6ecc73bcf..bf8fe9504 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -6,51 +6,51 @@ ;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++ea||typeof i=="undefined")return 1;if(ie?0:e);++r=b&&i===n,l=[]; if(f){var p=o(r);p?(i=t,r=p):f=false}for(;++ui(r,p)&&l.push(p);return f&&c(r),l}function rt(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r=b&&f===n,h=u||v?a():s;for(v&&(h=o(h),f=t);++if(h,y))&&((u||v)&&h.push(y),s.push(g)) }return v?(l(h.g),c(h)):u&&l(h),s}function ft(n){return function(t,e,r){var u={};e=d.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++r=r)return false;if(typeof n=="string"||!Ke(n)&&Ot(n))return Ne?Ne.call(n,t,e):-1e?De(0,r+e):e)||0,-1o&&(o=a)}}else t=null==t&&Ot(n)?r:d.createCallback(t,e,3),Tt(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Ft(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=d.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++oarguments.length;return t=d.createCallback(t,r,4),At(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function Wt(n){var t=-1,e=n?n.length:0,r=ne(typeof e=="number"?e:0);return Tt(n,function(n){var e=it(0,++t);r[t]=r[e],r[e]=n}),r}function qt(n,t,e){var r;t=d.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++er?De(0,u+r):r||0}else if(r)return r=Lt(t,e),t[r]===e?r:-1;return n(t,e,r)}function Kt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=d.createCallback(t,e,3);++u>>1,e(n[r])e?0:e);++t=v; m?(i&&(i=be(i)),s=f,a=n.apply(l,o)):i||(i=xe(r,v))}return m&&c?c=be(c):c||t===h||(c=xe(u,t)),e&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Jt(n){return n}function Qt(n,t,e){var r=true,u=t&&_t(t);t&&(e||u.length)||(null==e&&(e=t),o=H,t=n,n=d,u=_t(t)),false===e?r=false:xt(e)&&"chain"in e&&(r=e.chain);var o=n,i=kt(o);Tt(u,function(e){var u=n[e]=t[e];i&&(o.prototype[e]=function(){var t=this.__chain__,e=this.__wrapped__,i=[e];if(ke.apply(i,arguments),i=u.apply(n,i),r||t){if(e===i&&xt(i))return this; -i=new o(i),i.__chain__=t}return i})})}function Xt(){}function Yt(n){return function(t){return t[n]}}function Zt(){return this.__wrapped__}e=e?nt.defaults(J.Object(),e,nt.pick(J,D)):J;var ne=e.Array,te=e.Boolean,ee=e.Date,re=e.Function,ue=e.Math,oe=e.Number,ie=e.Object,ae=e.RegExp,fe=e.String,le=e.TypeError,ce=[],pe=ie.prototype,se=fe.prototype,ve=(ve=e.window)&&ve.document,he=e._,ge=pe.toString,ye=ae("^"+fe(ge).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me=ue.ceil,be=e.clearTimeout,de=ue.floor,_e=re.prototype.toString,we=st(we=ie.getPrototypeOf)&&we,je=pe.hasOwnProperty,ke=ce.push,xe=e.setTimeout,Ce=ce.splice,Oe=ce.unshift,Ee=function(){try{var n={},t=st(t=ie.defineProperty)&&t,e=t(n,n,n)&&t +i=new o(i),i.__chain__=t}return i})})}function Xt(){}function Yt(n){return function(t){return t[n]}}function Zt(){return this.__wrapped__}e=e?Z.defaults(J.Object(),e,Z.pick(J,D)):J;var ne=e.Array,te=e.Boolean,ee=e.Date,re=e.Function,ue=e.Math,oe=e.Number,ie=e.Object,ae=e.RegExp,fe=e.String,le=e.TypeError,ce=[],pe=ie.prototype,se=fe.prototype,ve=(ve=e.window)&&ve.document,he=e._,ge=pe.toString,ye=ae("^"+fe(ge).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me=ue.ceil,be=e.clearTimeout,de=ue.floor,_e=re.prototype.toString,we=st(we=ie.getPrototypeOf)&&we,je=pe.hasOwnProperty,ke=ce.push,xe=e.setTimeout,Ce=ce.splice,Oe=ce.unshift,Ee=function(){try{var n={},t=st(t=ie.defineProperty)&&t,e=t(n,n,n)&&t }catch(r){}return e}(),Ne=st(Ne=se.contains)&&Ne,Ie=st(Ie=ie.create)&&Ie,Re=st(Re=ne.isArray)&&Re,Se=e.isFinite,Te=e.isNaN,Ae=st(Ae=ie.keys)&&Ae,De=ue.max,$e=ue.min,Fe=e.parseInt,Be=ue.random,We={};We[F]=ne,We[B]=te,We[W]=ee,We[q]=re,We[P]=ie,We[z]=oe,We[K]=ae,We[L]=fe,H.prototype=d.prototype;var qe=d.support={};qe.funcDecomp=!st(e.WinRTError)&&T.test(s),qe.funcNames=typeof re.name=="string";try{qe.dom=11===ve.createDocumentFragment().nodeType}catch(ze){qe.dom=false}d.templateSettings={escape:E,evaluate:N,interpolate:I,variable:"",imports:{_:d}},Ie||(Y=function(){function n(){}return function(t){if(xt(t)){n.prototype=t; var r=new n;n.prototype=null}return r||e.Object()}}());var Pe=Ee?function(n,t){U.value=t,Ee(n,"__bindData__",U)}:Xt,Ke=Re||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ge.call(n)==F||false},Le=Ae?function(n){return xt(n)?Ae(n):[]}:g,Me={"&":"&","<":"<",">":">",'"':""","'":"'"},Ve=wt(Me),Ue=ae("("+Le(Ve).join("|")+")","g"),Ge=ae("["+Le(Me).join("")+"]","g");qe.dom||(jt=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!He(n)||false});var He=we?function(n){if(!n||ge.call(n)!=P)return false; var t=n.valueOf,e=st(t)&&(e=we(t))&&we(e);return e?n==e||we(n)==e:vt(n)}:vt,Je=ft(function(n,t,e){je.call(n,e)?n[e]++:n[e]=1}),Qe=ft(function(n,t,e){(je.call(n,e)?n[e]:n[e]=[]).push(t)}),Xe=ft(function(n,t,e){n[e]=t}),Ye=Dt,Ze=st(Ze=ee.now)&&Ze||function(){return(new ee).getTime()},nr=8==Fe(_+"08")?Fe:function(n,t){return Fe(Ot(n)?n.replace(R,""):n,t||0)};return d.after=function(n,t){if(!kt(t))throw new le;return function(){return 1>--n?t.apply(this,arguments):void 0}},d.assign=yt,d.at=function(n){for(var t=arguments,e=-1,r=rt(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=ne(t);++e=b&&o(r?e[r]:s)))}var p=e[0],h=-1,g=p?p.length:0,y=[];n:for(;++h(m?t(m,v):f(s,v))){for(r=u,(m||s).push(v);--r;)if(m=i[r],0>(m?t(m,v):f(e[r],v)))continue n;y.push(v)}}for(;u--;)(m=i[u])&&c(m);return l(i),l(s),y},d.invert=wt,d.invoke=function(n,t){var e=p(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,i=ne(typeof o=="number"?o:0);return Tt(n,function(n){i[++r]=(u?t:n[t]).apply(n,e)}),i},d.keys=Le,d.map=Dt,d.mapValues=function(n,t,e){var r={}; -return t=d.createCallback(t,e,3),bt(n,function(n,e,u){r[e]=t(n,e,u)}),r},d.max=$t,d.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):m+arguments[0];return je.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!kt(n))throw new le;return e.cache={},e},d.merge=function(n){var t=arguments,e=2;if(!xt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3e?De(0,r+e):$e(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},d.mixin=Qt,d.noConflict=function(){return e._=he,this},d.noop=Xt,d.now=Ze,d.parseInt=nr,d.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Be(),$e(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):it(n,t) },d.reduce=Ft,d.reduceRight=Bt,d.result=function(n,t){if(n){var e=n[t];return kt(e)?n[t]():e}},d.runInContext=s,d.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Le(n).length},d.some=qt,d.sortedIndex=Lt,d.template=function(n,t,e){var r=d.templateSettings;n=fe(n||""),e=mt({},e,r);var u,o=mt({},e.imports,r.imports),r=Le(o),o=Et(o),a=0,f=e.interpolate||S,l="__p+='",f=ae((e.escape||S).source+"|"+f.source+"|"+(f===I?x:S).source+"|"+(e.evaluate||S).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(a,c).replace(A,i),e&&(l+="'+__e("+e+")+'"),f&&(u=true,l+="';"+f+";\n__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),a=c+t.length,t }),l+="';",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(w,""):l).replace(j,"$1").replace(k,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=re(r,"return "+l).apply(v,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},d.unescape=function(n){return null==n?"":(n=fe(n),0>n.indexOf(";")?n:n.replace(Ue,ht))},d.uniqueId=function(n){var t=++y; return fe(null==n?"":n)+t},d.all=It,d.any=qt,d.detect=St,d.findWhere=St,d.foldl=Ft,d.foldr=Bt,d.include=Nt,d.inject=Ft,Qt(function(){var n={};return bt(d,function(t,e){d.prototype[e]||(n[e]=t)}),n}(),false),d.first=zt,d.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=d.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:v;return p(n,De(0,u-r))},d.sample=function(n,t,e){return n&&typeof n.length!="number"&&(n=Et(n)),null==t||e?n?n[it(0,n.length-1)]:v:(n=Wt(n),n.length=$e(De(0,t),n.length),n) },d.take=zt,d.head=zt,bt(d,function(n,t){var e="sample"!==t;d.prototype[t]||(d.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new H(o,u):o})}),d.VERSION="2.4.1",d.prototype.chain=function(){return this.__chain__=true,this},d.prototype.toString=function(){return fe(this.__wrapped__)},d.prototype.value=Zt,d.prototype.valueOf=Zt,Tt(["join","pop","shift"],function(n){var t=ce[n];d.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments); return n?new H(e,n):e}}),Tt(["push","reverse","sort","unshift"],function(n){var t=ce[n];d.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Tt(["concat","slice","splice"],function(n){var t=ce[n];d.prototype[n]=function(){return new H(t.apply(this.__wrapped__,arguments),this.__chain__)}}),d}var v,h=[],g=[],y=0,m=+new Date+"",b=75,d=40,_=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",w=/\b__p\+='';/g,j=/\b(__p\+=)''\+/g,k=/(__e\(.*?\)|\b__t\))\+'';/g,x=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,O=/^\s*function[ \n\r\t]+\w/,E=/<%-([\s\S]+?)%>/g,N=/<%([\s\S]+?)%>/g,I=/<%=([\s\S]+?)%>/g,R=RegExp("^["+_+"]*0+(?=.$)"),S=/($^)/,T=/\bthis\b/,A=/['\n\r\t\u2028\u2029\\]/g,D="Array Boolean Date Function Math Number Object RegExp String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),$="[object Arguments]",F="[object Array]",B="[object Boolean]",W="[object Date]",q="[object Function]",z="[object Number]",P="[object Object]",K="[object RegExp]",L="[object String]",M={}; -M[q]=false,M[$]=M[F]=M[B]=M[W]=M[z]=M[P]=M[K]=M[L]=true;var V={leading:false,maxWait:0,trailing:false},U={configurable:false,enumerable:false,value:null,writable:false},G={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},H={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},J=G[typeof window]&&window||this,Q=G[typeof exports]&&exports&&!exports.nodeType&&exports,X=G[typeof module]&&module&&!module.nodeType&&module,Y=X&&X.exports===Q&&Q,Z=G[typeof global]&&global;!Z||Z.global!==Z&&Z.window!==Z||(J=Z); -var nt=s();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(J._=nt, define(function(){return nt})):Q&&X?Y?(X.exports=nt)._=nt:Q._=nt:J._=nt}).call(this); \ No newline at end of file +M[q]=false,M[$]=M[F]=M[B]=M[W]=M[z]=M[P]=M[K]=M[L]=true;var V={leading:false,maxWait:0,trailing:false},U={configurable:false,enumerable:false,value:null,writable:false},G={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},H={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},J=G[typeof window]&&window||this,Q=G[typeof exports]&&exports&&!exports.nodeType&&exports,X=G[typeof global]&&global;!X||X.global!==X&&X.window!==X||(J=X);var Y=(X=G[typeof module]&&module&&!module.nodeType&&module)&&X.exports===Q&&Q,Z=s(); +typeof define=="function"&&typeof define.amd=="object"&&define.amd?(J._=Z, define(function(){return Z})):Q&&X?Y?(X.exports=Z)._=Z:Q._=Z:J._=Z}).call(this); \ No newline at end of file diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index 90071dfcd..e8117bd4d 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -70,18 +70,18 @@ /** Detect free variable `exports` */ var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; - /** Detect free variable `module` */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect the popular CommonJS extension `module.exports` */ - var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; - /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ var freeGlobal = objectTypes[typeof global] && global; if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { root = freeGlobal; } + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + /*--------------------------------------------------------------------------*/ /** @@ -4529,8 +4529,8 @@ * @param {RegExp} [options.evaluate] The "evaluate" delimiter. * @param {Object} [options.imports] An object to import into the template as local variables. * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [sourceURL] The sourceURL of the template's compiled source. - * @param {string} [variable] The data object variable name. + * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. + * @param {string} [options.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 diff --git a/dist/lodash.underscore.min.js b/dist/lodash.underscore.min.js index b1ed3c42b..5c7055c9a 100644 --- a/dist/lodash.underscore.min.js +++ b/dist/lodash.underscore.min.js @@ -19,9 +19,9 @@ return r=Y(r,e,4),I(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function P( for(r=Y(r,t,3);++ie?Wr(0,u+e):e||0}else if(e)return e=K(r,t),r[e]===t?e:-1;return n(r,t,e)}function J(n,r,t){if(typeof r!="number"&&null!=r){var u=0,o=-1,i=n?n.length:0;for(r=Y(r,t,3);++o>>1,t(n[e])=y;m?(u&&(u=clearTimeout(u)),c=i,o=n.apply(f,e)):u||(u=setTimeout(v,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(h,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function Y(n,r,t){var e=typeof n;if(null==n||"function"==e)return a(n,r,t);if("object"!=e)return rr(n);var u=Gr(n); -return function(r){for(var t=u.length,e=false;t--&&(e=r[u[t]]===n[u[t]]););return e}}function Z(n){return n}function nr(n){D(T(n),function(r){var t=u[r]=n[r];u.prototype[r]=function(){var n=[this.__wrapped__];return Fr.apply(n,arguments),n=t.apply(u,n),this.__chain__?new o(n,true):n}})}function rr(n){return function(r){return r[n]}}var tr,er=0,ur={},or=+new Date+"",ir=/($^)/,fr=/['\n\r\t\u2028\u2029\\]/g,ar="[object Arguments]",lr="[object Array]",cr="[object Boolean]",pr="[object Date]",sr="[object Number]",gr="[object Object]",hr="[object RegExp]",vr="[object String]",yr={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},mr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},_r=yr[typeof window]&&window||this,dr=yr[typeof exports]&&exports&&!exports.nodeType&&exports,br=yr[typeof module]&&module&&!module.nodeType&&module,wr=br&&br.exports===dr&&dr,jr=yr[typeof global]&&global; -!jr||jr.global!==jr&&jr.window!==jr||(_r=jr);var xr=[],Tr=Object.prototype,Er=_r._,Ar=Tr.toString,Or=RegExp("^"+(Ar+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Sr=Math.ceil,kr=Math.floor,Nr=Function.prototype.toString,Rr=Tr.hasOwnProperty,Fr=xr.push,Br=Tr.propertyIsEnumerable,$r=_($r=Object.create)&&$r,qr=_(qr=Array.isArray)&&qr,Dr=_r.isFinite,Ir=_r.isNaN,Mr=_(Mr=Object.keys)&&Mr,Wr=Math.max,zr=Math.min,Cr=Math.random;o.prototype=u.prototype; -var Pr={};!function(){var n={0:1,length:1};Pr.spliceObjects=(xr.splice.call(n,0,1),!n[0])}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},$r||(f=function(){function n(){}return function(r){if(S(r)){n.prototype=r;var t=new n;n.prototype=null}return t||_r.Object()}}()),b(arguments)||(b=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Rr.call(n,"callee")&&!Br.call(n,"callee")||false});var Ur=qr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ar.call(n)==lr||false +return function(r){for(var t=u.length,e=false;t--&&(e=r[u[t]]===n[u[t]]););return e}}function Z(n){return n}function nr(n){D(T(n),function(r){var t=u[r]=n[r];u.prototype[r]=function(){var n=[this.__wrapped__];return Fr.apply(n,arguments),n=t.apply(u,n),this.__chain__?new o(n,true):n}})}function rr(n){return function(r){return r[n]}}var tr,er=0,ur={},or=+new Date+"",ir=/($^)/,fr=/['\n\r\t\u2028\u2029\\]/g,ar="[object Arguments]",lr="[object Array]",cr="[object Boolean]",pr="[object Date]",sr="[object Number]",gr="[object Object]",hr="[object RegExp]",vr="[object String]",yr={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},mr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},_r=yr[typeof window]&&window||this,dr=yr[typeof exports]&&exports&&!exports.nodeType&&exports,br=yr[typeof global]&&global; +!br||br.global!==br&&br.window!==br||(_r=br);var wr=yr[typeof module]&&module&&!module.nodeType&&module,jr=wr&&wr.exports===dr&&dr,xr=[],Tr=Object.prototype,Er=_r._,Ar=Tr.toString,Or=RegExp("^"+(Ar+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Sr=Math.ceil,kr=Math.floor,Nr=Function.prototype.toString,Rr=Tr.hasOwnProperty,Fr=xr.push,Br=Tr.propertyIsEnumerable,$r=_($r=Object.create)&&$r,qr=_(qr=Array.isArray)&&qr,Dr=_r.isFinite,Ir=_r.isNaN,Mr=_(Mr=Object.keys)&&Mr,Wr=Math.max,zr=Math.min,Cr=Math.random; +o.prototype=u.prototype;var Pr={};!function(){var n={0:1,length:1};Pr.spliceObjects=(xr.splice.call(n,0,1),!n[0])}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},$r||(f=function(){function n(){}return function(r){if(S(r)){n.prototype=r;var t=new n;n.prototype=null}return t||_r.Object()}}()),b(arguments)||(b=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Rr.call(n,"callee")&&!Br.call(n,"callee")||false});var Ur=qr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ar.call(n)==lr||false },Vr=function(n){var r=[];if(!n||!yr[typeof n])return r;for(var t in n)Rr.call(n,t)&&r.push(t);return r},Gr=Mr?function(n){return S(n)?Mr(n):[]}:Vr,Hr={"&":"&","<":"<",">":">",'"':""","'":"'"},Jr=E(Hr),Kr=RegExp("("+Gr(Jr).join("|")+")","g"),Lr=RegExp("["+Gr(Hr).join("")+"]","g"),Qr=function(n,r){if(!n||!yr[typeof n])return n;for(var t in n)if(r(n[t],t,n)===ur)break;return n};O(/x/)&&(O=function(n){return typeof n=="function"&&"[object Function]"==Ar.call(n)});var Xr=h(function(n,r,t){Rr.call(n,t)?n[t]++:n[t]=1 }),Yr=h(function(n,r,t){(Rr.call(n,t)?n[t]:n[t]=[]).push(r)}),Zr=h(function(n,r,t){n[t]=r}),nt=M,rt=_(rt=Date.now)&&rt||function(){return(new Date).getTime()};u.after=function(n,r){if(!O(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=Q,u.bindAll=function(n){for(var r=1n.indexOf(";")?n:n.replace(Kr,d))},u.uniqueId=function(n){var r=++er+"";return n?n+r:r},u.all=B,u.any=U,u.detect=q,u.findWhere=function(n,r){return V(n,r,true)},u.foldl=z,u.foldr=C,u.include=F,u.inject=z,u.first=G,u.last=function(n,r,t){var u=0,o=n?n.length:0; if(typeof r!="number"&&null!=r){var i=o;for(r=Y(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:tr;return e(n,Wr(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=R(n)),null==r||t?n?n[0+kr(Cr()*(n.length-1-0+1))]:tr:(n=P(n),n.length=zr(Wr(0,r),n.length),n)},u.take=G,u.head=G,nr(w({},u)),u.VERSION="2.4.1",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.value=function(){return this.__wrapped__},D("pop push reverse shift sort splice unshift".split(" "),function(n){var r=xr[n]; -u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Pr.spliceObjects||0!==n.length||delete n[0],this}}),D(["concat","join","slice"],function(n){var r=xr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(_r._=u, define(function(){return u})):dr&&br?wr?(br.exports=u)._=u:dr._=u:_r._=u}).call(this); \ No newline at end of file +u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Pr.spliceObjects||0!==n.length||delete n[0],this}}),D(["concat","join","slice"],function(n){var r=xr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(_r._=u, define(function(){return u})):dr&&wr?jr?(wr.exports=u)._=u:dr._=u:_r._=u}).call(this); \ No newline at end of file diff --git a/lodash.js b/lodash.js index 24e6d449f..74f912926 100644 --- a/lodash.js +++ b/lodash.js @@ -154,18 +154,18 @@ /** Detect free variable `exports` */ var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; - /** Detect free variable `module` */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect the popular CommonJS extension `module.exports` */ - var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; - /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ var freeGlobal = objectTypes[typeof global] && global; if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { root = freeGlobal; } + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + /*--------------------------------------------------------------------------*/ /** diff --git a/vendor/benchmark.js/benchmark.js b/vendor/benchmark.js/benchmark.js index 7bafd480a..d8023dac9 100644 --- a/vendor/benchmark.js/benchmark.js +++ b/vendor/benchmark.js/benchmark.js @@ -5,28 +5,40 @@ * Modified by John-David Dalton * Available under MIT license */ -;(function(root, undefined) { +;(function(undefined) { 'use strict'; + /** Used to determine if values are of the language type Object */ + var objectTypes = { + 'boolean': false, + 'function': true, + 'object': true, + 'number': false, + 'string': false, + 'undefined': false + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + /** Detect free variable `define` */ - var freeDefine = typeof define == 'function' && - typeof define.amd == 'object' && define.amd && define; + var freeDefine = typeof define == 'function' && typeof define.amd == 'object' && define.amd && define; /** Detect free variable `exports` */ - var freeExports = typeof exports == 'object' && exports; + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `global`, from Node.js or Browserified code, and use it as `root` */ + var freeGlobal = objectTypes[typeof global] && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { + root = freeGlobal; + } /** Detect free variable `module` */ - var freeModule = typeof module == 'object' && module && module.exports == freeExports && module; + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; /** Detect free variable `require` */ var freeRequire = typeof require == 'function' && require; - /** Detect free variable `global`, from Node.js or Browserified code, and use it as `root` */ - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - /** Used to assign each benchmark an incrimented id */ var counter = 0; @@ -2864,4 +2876,4 @@ root.Benchmark = Benchmark; } } -}(this)); +}.call(this));