Fix recent typo in isEqual.

Former-commit-id: 84cdf90de59c8184a0ac1f78704f61dcc88c91f1
This commit is contained in:
John-David Dalton
2012-07-25 01:33:16 -07:00
parent 0d7bdb6fa8
commit 4ff12e0426
3 changed files with 66 additions and 66 deletions

8
lodash.min.js vendored
View File

@@ -12,7 +12,7 @@ it.call(e,t==r||n?1:t):[]}function T(e,t,n,r){if(!e)return 0;var i=0,s=e.length;
et.apply(s,o):s),this instanceof n?(d.prototype=e.prototype,u=new d,(o=e.apply(u,o))&&Ot[typeof o]?o:u):e.apply(u,o)}var r,i=st.call(e)==dt;if(i){if(Nt||ot&&2<arguments.length)return ot.call.apply(ot,arguments)}else r=t,t=e;var s=it.call(arguments,2);return n}function k(e,t,s,o){if(!e)return e;var u="object"==typeof e;o||(o=[]),s&&(t=i);if(e.clone&&st.call(e.clone)==dt)return e.clone(t);if(u){var a=st.call(e);if(!Lt[a]||St&&L(e))return e;var f=e.constructor,l=a==ct,c=st.call(f)==dt;a==mt&&(u=c&&f instanceof
f)&&(on(e,function(e,t){u=t}),u=u==n||tt.call(e,u))}if(!u||!t)return u?l?it.call(e):sn({},e):e;switch(a){case ht:return new f(e==n);case pt:return new f(+e);case vt:case yt:return new f(e);case gt:return f(e.source,X.exec(e))}for(s=o.length;s--;)if(o[s].value==e)return o[s].clone;var s=e.length,h=l?f(s):c?new f:{};o.push({clone:h,value:e});if(l)for(f=-1;++f<s;)h[f]=k(e[f],t,r,o);else un(e,function(e,n){h[n]=k(e,t,r,o)});return h}function L(e){return st.call(e)==lt}function A(e,t,s){s||(s=[]);if(e==
r||t==r)return e===t;e._chain&&(e=e._wrapped),t._chain&&(t=t._wrapped);if(e.isEqual&&st.call(e.isEqual)==dt)return e.isEqual(t);if(t.isEqual&&st.call(t.isEqual)==dt)return t.isEqual(e);if(e===t)return 0!==e||1/e==1/t;var o=st.call(e);if(o!=st.call(t))return i;switch(o){case ht:case pt:return+e==+t;case vt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case gt:case yt:return e==t+""}if("object"!=typeof e||"object"!=typeof t)return i;for(var u=s.length;u--;)if(s[u]==e)return n;var u=-1,a=n,f=0;s.push(e);if(
kt[o]||St&&L(value)){if(f=e.length,a=f==t.length)for(;f--&&(a=A(e[f],t[f],s)););}else{if("constructor"in e!="constructor"in t||e.constructor!=t.constructor)return i;for(var l in e)if(tt.call(e,l)&&(f++,!(a=tt.call(t,l)&&A(e[l],t[l],s))))break;if(a){for(l in t)if(tt.call(t,l)&&!(f--))break;a=!f}if(a&&Et)for(;7>++u&&(l=G[u],!tt.call(e,l)||!!(a=tt.call(t,l)&&A(e[l],t[l],s))););}return a}function O(e){return e}function M(e){Vt(an(e),function(t){var r=s[t]=e[t];o.prototype[t]=function(){var e=[this._wrapped
kt[o]||St&&L(e)){if(f=e.length,a=f==t.length)for(;f--&&(a=A(e[f],t[f],s)););}else{if("constructor"in e!="constructor"in t||e.constructor!=t.constructor)return i;for(var l in e)if(tt.call(e,l)&&(f++,!(a=tt.call(t,l)&&A(e[l],t[l],s))))break;if(a){for(l in t)if(tt.call(t,l)&&!(f--))break;a=!f}if(a&&Et)for(;7>++u&&(l=G[u],!tt.call(e,l)||!!(a=tt.call(t,l)&&A(e[l],t[l],s))););}return a}function O(e){return e}function M(e){Vt(an(e),function(t){var r=s[t]=e[t];o.prototype[t]=function(){var e=[this._wrapped
];return arguments.length&&nt.apply(e,arguments),e=r.apply(s,e),this._chain&&(e=new o(e),e._chain=n),e}})}var n=!0,r=null,i=!1,_,D,P,H,B="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),j=Array.prototype,F=Object.prototype,I=0,q=e._,R=/[-+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,U=/\b__p\+='';/g,z=/\b(__p\+=)''\+/g,W=/(__e\(.*?\)|\b__t\))\+'';/g,X=/\w*$/,V=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,$=RegExp("^"+
(F.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),J=/__token__(\d+)/g,K=/[&<"']/g,Q=/['\n\r\t\u2028\u2029\\]/g,G="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Y="__token__",Z=[],et=j.concat,tt=F.hasOwnProperty,nt=j.push,rt=F.propertyIsEnumerable,it=j.slice,st=F.toString,ot=$.test(ot=it.bind)&&ot,ut=$.test(ut=Array.isArray)&&ut,at=e.isFinite,ft=$.test(ft=Object.keys)&&ft,lt="[object Arguments]"
,ct="[object Array]",ht="[object Boolean]",pt="[object Date]",dt="[object Function]",vt="[object Number]",mt="[object Object]",gt="[object RegExp]",yt="[object String]",bt=e.clearTimeout,wt=e.setTimeout,Et=!rt.call({valueOf:0},"valueOf"),St=!L(arguments),xt="x"!=it.call("x")[0],Tt="xx"!="x"[0]+Object("x")[0],Nt=ot&&/\n|Opera/.test(ot+st.call(e.opera)),Ct=ft&&/^.+$|true/.test(ft+!!e.attachEvent),kt={"[object Arguments]":n,"[object Array]":n,"[object String]":n},Lt={"[object Array]":n,"[object Boolean]"
@@ -27,9 +27,9 @@ arguments,1);return wt(function(){return e.apply(t,n)},1)},s.delay=function(e,n)
function(e,t){return tt.call(e,t)},s.identity=O,s.indexOf=E,s.initial=function(e,t,n){return e?it.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=[];if(!e)return t;for(var n,r=-1,i=e.length,s=it.call(arguments,1),o=[];++r<i;)n=e[r],0>E(t,n)&&zt(s,function(e,t){return(o[t]||(o[t]=u(e)))(n)})&&t.push(n);return t},s.invoke=Jt,s.isArguments=L,s.isArray=fn,s.isBoolean=function(e){return e===n||e===i||st.call(e)==ht},s.isElement=function(e){return!!e&&1==e.nodeType},s.isEmpty=ln,s.isEqual=
A,s.isFinite=function(e){return at(e)&&st.call(e)==vt},s.isNaN=function(e){return st.call(e)==vt&&e!=+e},s.isNull=function(e){return e===r},s.isObject=function(e){return e&&Ot[typeof e]},s.isUndefined=function(e){return e===t},s.keys=cn,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:it.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){if(!e)return-1;var r=e.length;for(n&&"number"==typeof n&&(r=(0>n?Math.max(0,r+n):Math.min(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.map=Kt,s.max=
S,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return tt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.min=function(e,t,n){var r=Infinity,i=r;if(!e)return i;var s=-1,o=e.length;if(!t){for(;++s<o;)e[s]<i&&(i=e[s]);return i}for(n&&(t=p(t,n));++s<o;)n=t(e[s],s,e),n<r&&(r=n,i=e[s]);return i},s.mixin=M,s.noConflict=function(){return e._=q,this},s.once=function(e){var t,r=i;return function(){return r?t:(r=n,t=e.apply(this,arguments))}},s.partial=function(
e){var t=it.call(arguments,1),n=t.length;return function(){var r;return r=arguments,r.length&&(t.length=n,nt.apply(t,r)),r=1==t.length?e.call(this,t[0]):e.apply(this,t),t.length=n,r}},s.pick=function(e){for(var t,n=0,r=et.apply(j,arguments),i=r.length,s={};++n<i;)t=r[n],t in e&&(s[t]=e[t]);return s},s.pluck=Qt,s.range=function(e,t,n){n||(n=1),t==r&&(t=e||0,e=0);for(var i=-1,t=Math.max(0,Math.ceil((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=Gt,s.reduceRight=y,s.reject=Yt,s.rest=x,s.
result=function(e,t){if(!e)return r;var n=e[t];return st.call(n)==dt?e[t]():n},s.shuffle=function(e){if(!e)return[];for(var t,n=-1,r=e.length,i=Array(r);++n<r;)t=Math.floor(Math.random()*(n+1)),i[n]=i[t],i[t]=e[n];return i},s.size=function(e){return e?kt[st.call(e)]||St&&L(e)?e.length:cn(e).length:0},s.some=Zt,s.sortBy=en,s.sortedIndex=T,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){n||(n={});var o,u;o=n.escape;var a=n.evaluate,f=n.interpolate,h=s.templateSettings,n=n.variable;o==
r&&(o=h.escape),a==r&&(a=h.evaluate||i),f==r&&(f=h.interpolate),o&&(e=e.replace(o,v)),f&&(e=e.replace(f,g)),a!=_&&(_=a,H=RegExp("<e%-([\\s\\S]+?)%>|<e%=([\\s\\S]+?)%>"+(a?"|"+a.source:""),"g")),o=Z.length,e=e.replace(H,m),o=o!=Z.length,e="__p += '"+e.replace(Q,c).replace(J,l)+"';",Z.length=0,n||(n=h.variable||D||"obj",o?e="with("+n+"){"+e+"}":(n!=D&&(D=n,P=RegExp("(\\(\\s*)"+n+"\\."+n+"\\b","g")),e=e.replace(V,"$&"+n+".").replace(P,"$1__d"))),e=(o?e.replace(U,""):e).replace(z,"$1").replace(W,"$1;"
e){var t=it.call(arguments,1),n=t.length;return function(){var r;return r=arguments,r.length&&(t.length=n,nt.apply(t,r)),r=1==t.length?e.call(this,t[0]):e.apply(this,t),t.length=n,r}},s.pick=function(e){for(var t,n=0,r=et.apply(j,arguments),i=r.length,s={};++n<i;)t=r[n],t in e&&(s[t]=e[t]);return s},s.pluck=Qt,s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Math.max(0,Math.ceil((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=Gt,s.reduceRight=y,s.reject=Yt,s.rest=
x,s.result=function(e,t){if(!e)return r;var n=e[t];return st.call(n)==dt?e[t]():n},s.shuffle=function(e){if(!e)return[];for(var t,n=-1,r=e.length,i=Array(r);++n<r;)t=Math.floor(Math.random()*(n+1)),i[n]=i[t],i[t]=e[n];return i},s.size=function(e){return e?kt[st.call(e)]||St&&L(e)?e.length:cn(e).length:0},s.some=Zt,s.sortBy=en,s.sortedIndex=T,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){n||(n={});var o,u;o=n.escape;var a=n.evaluate,f=n.interpolate,h=s.templateSettings,n=n.variable
;o==r&&(o=h.escape),a==r&&(a=h.evaluate||i),f==r&&(f=h.interpolate),o&&(e=e.replace(o,v)),f&&(e=e.replace(f,g)),a!=_&&(_=a,H=RegExp("<e%-([\\s\\S]+?)%>|<e%=([\\s\\S]+?)%>"+(a?"|"+a.source:""),"g")),o=Z.length,e=e.replace(H,m),o=o!=Z.length,e="__p += '"+e.replace(Q,c).replace(J,l)+"';",Z.length=0,n||(n=h.variable||D||"obj",o?e="with("+n+"){"+e+"}":(n!=D&&(D=n,P=RegExp("(\\(\\s*)"+n+"\\."+n+"\\b","g")),e=e.replace(V,"$&"+n+".").replace(P,"$1__d"))),e=(o?e.replace(U,""):e).replace(z,"$1").replace(W,"$1;"
),e="function("+n+"){"+n+"||("+n+"={});var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":",__d="+n+"."+n+"||"+n+";")+e+"return __p}";try{u=Function("_","return "+e)(s)}catch(p){u=function(){throw p}}return t?u(t):(u.source=e,u)},s.throttle=function(e,t){function n(){a=new Date,u=r,e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(a=r,s=e.apply(o,i)):u||(u=wt(n,f)),s}},s.times=function(e,t
,n){var r=-1;if(n)for(;++r<e;)t.call(n,r);else for(;++r<e;)t(r)},s.toArray=function(e){if(!e)return[];if(e.toArray&&st.call(e.toArray)==dt)return e.toArray();var t=e.length;return t===t>>>0?(xt?st.call(e)==yt:"string"==typeof e)?e.split(""):it.call(e):hn(e)},s.union=function(){for(var e=-1,t=[],n=et.apply(t,arguments),r=n.length;++e<r;)0>E(t,n[e])&&t.push(n[e]);return t},s.uniq=N,s.uniqueId=function(e){var t=I++;return e?e+t:t},s.values=hn,s.without=function(e){var t=[];if(!e)return t;for(var n=-1
,r=e.length,i=u(arguments,1,20);++n<r;)i(e[n])||t.push(e[n]);return t},s.wrap=function(e,t){return function(){var n=[e];return arguments.length&&nt.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){if(!e)return[];for(var t=-1,n=S(Qt(arguments,"length")),r=Array(n);++t<n;)r[t]=Qt(arguments,t);return r},s.zipObject=function(e,t){if(!e)return{};var n=-1,r=e.length,i={};for(t||(t=[]);++n<r;)i[e[n]]=t[n];return i},s.all=zt,s.any=Zt,s.collect=Kt,s.detect=Xt,s.each=Vt,s.foldl=Gt,s.foldr=y,s.head=b,