diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index b3b59d912..3651ada66 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -238,7 +238,7 @@ * @returns {Number} Returns the sort order indicator of `1` or `-1`. */ function compareAscending(a, b) { - var ac = a.criteria; + var ac = a.criteria, bc = b.criteria; // ensure a stable sort in V8 and other engines diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index 733108794..e12892456 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -4,7 +4,7 @@ * Build: `lodash -o ./dist/lodash.compat.js` */ ;!function(n){function t(n,t,r){r=(r||0)-1;for(var e=n?n.length:0;++rbc||typeof r=="undefined")return 1;if(re||typeof r=="undefined")return 1;if(rr?0:r);++ebc||typeof r=="undefined")return 1;if(rr?0:r);++ee||typeof r=="undefined")return 1;if(rr?0:r);++e=k&&a===t,h=u||v?f():l;if(v){var g=i(h);g?(a=r,h=g):(v=m,h=u?h:(p(h),l)) -}for(;++oa(h,y))&&((u||v)&&h.push(y),l.push(g))}return v?(p(h.b),s(h)):u&&p(h),l}function at(n){return function(t,r,e){var u={};return r=Z.createCallback(r,e,3),Ot(t,function(t,e,o){e=rr(r(t,e,o)),n(u,t,e,o)}),u}}function ft(n,t,r,e,u,o){var i=1&t,a=2&t,f=4&t,c=8&t,l=16&t,p=32&t;if(!a&&!bt(n))throw new er;var s=n&&n.__bindData__;if(s)return i&&!(1&s[1])&&(s[4]=u),!i&&1&s[1]&&(t|=8),f&&!(4&s[1])&&(s[5]=o),l&&yr.apply(s[2]||(s[2]=[]),r),p&&yr.apply(s[3]||(s[3]=[]),e),s[1]|=t,ft.apply(b,s); -if(!i||a||f||p||!(Fr.fastBind||jr&&r.length))v=function(){var l=arguments,p=i?u:this;return r&&wr.apply(l,r),e&&yr.apply(l,e),f&&l.lengthr?Ir(0,o+r):r)||0,o&&typeof o=="number"?i=-1<(dt(n)?n.indexOf(t,r):u(n,t,r)):d(n,function(n){return++e=k&&a===t,h=u||v?f():l;if(v){var g=i(h);g?(a=r,h=g):(v=_,h=u?h:(p(h),l)) +}for(;++oa(h,y))&&((u||v)&&h.push(y),l.push(g))}return v?(p(h.b),s(h)):u&&p(h),l}function at(n){return function(t,r,e){var u={};return r=Z.createCallback(r,e,3),Ot(t,function(t,e,o){e=rr(r(t,e,o)),n(u,t,e,o)}),u}}function ft(n,t,r,e,u,o){var i=1&t,a=2&t,f=4&t,c=8&t,l=16&t,p=32&t;if(!a&&!mt(n))throw new er;var s=n&&n.__bindData__;if(s)return i&&!(1&s[1])&&(s[4]=u),!i&&1&s[1]&&(t|=8),f&&!(4&s[1])&&(s[5]=o),l&&yr.apply(s[2]||(s[2]=[]),r),p&&yr.apply(s[3]||(s[3]=[]),e),s[1]|=t,ft.apply(m,s); +if(!i||a||f||p||!(Fr.fastBind||jr&&r.length))v=function(){var l=arguments,p=i?u:this;return r&&wr.apply(l,r),e&&yr.apply(l,e),f&&l.lengthr?Ir(0,o+r):r)||0,o&&typeof o=="number"?i=-1<(dt(n)?n.indexOf(t,r):u(n,t,r)):d(n,function(n){return++eo&&(o=a)}}else t=!t&&dt(n)?u:Z.createCallback(t,r,3),Ot(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,o=n) -});return o}function At(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Ht(e);++rarguments.length;t=rt(t,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(r=n[++o]);++oarguments.length;return t=rt(t,e,4),Et(n,function(n,e,o){r=u?(u=m,n):t(r,n,e,o)}),r}function Bt(n,t,r){var e;t=Z.createCallback(t,r,3),r=-1; -var u=n?n.length:0;if(typeof u=="number")for(;++r=k&&u===t;if(c){var l=i(a);l?(u=r,a=l):c=m}for(;++eu(a,l)&&f.push(l);return c&&s(a),f}function Dt(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=b){var o=-1;for(t=Z.createCallback(t,r,3);++oe?Ir(0,u+e):e||0}else if(e)return e=zt(n,r),n[e]===r?e:-1;return n?t(n,r,e):-1}function Tt(n,t,r){if(typeof t!="number"&&t!=b){var e=0,u=-1,o=n?n.length:0;for(t=Z.createCallback(t,r,3);++u>>1,r(n[e])r?0:r);++tc&&(a=n.apply(f,i));else{var r=gr();!s&&!g&&(l=r);var o=p-(r-l);0arguments.length;t=rt(t,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(r=n[++o]);++oarguments.length;return t=rt(t,e,4),Et(n,function(n,e,o){r=u?(u=_,n):t(r,n,e,o)}),r}function Bt(n,t,r){var e;t=Z.createCallback(t,r,3),r=-1; +var u=n?n.length:0;if(typeof u=="number")for(;++r=k&&u===t;if(c){var l=i(a);l?(u=r,a=l):c=_}for(;++eu(a,l)&&f.push(l);return c&&s(a),f}function Dt(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=m){var o=-1;for(t=Z.createCallback(t,r,3);++oe?Ir(0,u+e):e||0}else if(e)return e=zt(n,r),n[e]===r?e:-1;return n?t(n,r,e):-1}function Tt(n,t,r){if(typeof t!="number"&&t!=m){var e=0,u=-1,o=n?n.length:0;for(t=Z.createCallback(t,r,3);++u>>1,r(n[e])r?0:r);++tc&&(a=n.apply(f,i));else{var r=gr();!s&&!g&&(l=r);var o=p-(r-l);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:Z}}; -var Tr=lr?function(n,t){var r=c();r.value=t,lr(n,"__bindData__",r),s(r)}:l,zr=xr||function(n){return n&&typeof n=="object"?dr.call(n)==z:m},qr=Er?function(n){return mt(n)?Er(n):[]}:X,Wr={"&":"&","<":"<",">":">",'"':""","'":"'"},Pr=yt(Wr),Kr=tr("("+qr(Pr).join("|")+")","g"),Lr=tr("["+qr(Wr).join("")+"]","g"),Mr=at(function(n,t,r){hr.call(n,r)?n[r]++:n[r]=1}),Ur=at(function(n,t,r){(hr.call(n,r)?n[r]:n[r]=[]).push(t)}),Vr=at(function(n,t,r){n[r]=t});$r&&Q&&typeof br=="function"&&(Mt=function(n){if(!bt(n))throw new er; -return br.apply(e,arguments)});var Gr=8==Ar(C+"08")?Ar:function(n,t){return Ar(dt(n)?n.replace(R,""):n,t||0)};return Z.after=function(n,t){if(!bt(t))throw new er;return function(){return 1>--n?t.apply(this,arguments):void 0}},Z.assign=J,Z.at=function(n){for(var t=-1,r=et(arguments,y,m,1),e=r.length,u=Ht(e);++t=k&&i(o?e[o]:g)}n:for(;++c(b?r(b,y):l(g,y))){for(o=u,(b||g).push(y);--o;)if(b=a[o],0>(b?r(b,y):l(e[o],y)))continue n;h.push(y)}}for(;u--;)(b=a[u])&&s(b);return p(a),p(g),h},Z.invert=yt,Z.invoke=function(n,t){var r=Rr.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Ht(typeof o=="number"?o:0);return Ot(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},Z.keys=qr,Z.map=It,Z.max=St,Z.memoize=function(n,t){function r(){var e=r.cache,u=j+(t?t.apply(this,arguments):arguments[0]); -return hr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!bt(n))throw new er;return r.cache={},r},Z.merge=function(n){var t=arguments,r=2;if(!mt(n))return n;if("number"!=typeof t[2]&&(r=t.length),3e(i,r))&&(o[r]=n)}),o},Z.once=function(n){var t,r;if(!bt(n))throw new er;return function(){return t?r:(t=y,r=n.apply(this,arguments),n=b,r)}},Z.pairs=function(n){for(var t=-1,r=qr(n),e=r.length,u=Ht(e);++tr?Ir(0,e+r):Sr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},Z.mixin=Vt,Z.noConflict=function(){return e._=ir,this},Z.parseInt=Gr,Z.random=function(n,t){n==b&&t==b&&(t=1),n=+n||0,t==b?(t=n,n=0):t=+t||0;var r=Nr();return n%1||t%1?n+Sr(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+pr(r*(t-n+1))},Z.reduce=Nt,Z.reduceRight=Rt,Z.result=function(n,t){var r=n?n[t]:g; -return bt(r)?n[t]():r},Z.runInContext=h,Z.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:qr(n).length},Z.some=Bt,Z.sortedIndex=zt,Z.template=function(n,t,r){var e=Z.templateSettings;n||(n=""),r=H({},r,e);var u,o=H({},r.imports,e.imports),e=qr(o),o=wt(o),i=0,f=r.interpolate||B,c="__p+='",f=tr((r.escape||B).source+"|"+f.source+"|"+(f===N?S:B).source+"|"+(r.evaluate||B).source+"|$","g");n.replace(f,function(t,r,e,o,f,l){return e||(e=o),c+=n.slice(i,l).replace(D,a),r&&(c+="'+__e("+r+")+'"),f&&(u=y,c+="';"+f+";__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),i=l+t.length,t -}),c+="';\n",f=r=r.variable,f||(r="obj",c="with("+r+"){"+c+"}"),c=(u?c.replace(O,""):c).replace(E,"$1").replace(I,"$1;"),c="function("+r+"){"+(f?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var l=Xt(e,"return "+c).apply(g,o)}catch(p){throw p.source=c,p}return t?l(t):(l.source=c,l)},Z.unescape=function(n){return n==b?"":rr(n).replace(Kr,st)},Z.uniqueId=function(n){var t=++w;return rr(n==b?"":n)+t -},Z.all=kt,Z.any=Bt,Z.detect=Ct,Z.findWhere=Ct,Z.foldl=Nt,Z.foldr=Rt,Z.include=jt,Z.inject=Nt,d(Z,function(n,t){Z.prototype[t]||(Z.prototype[t]=function(){var t=[this.__wrapped__],r=this.__chain__;return yr.apply(t,arguments),t=n.apply(Z,t),r?new nt(t,r):t})}),Z.first=Dt,Z.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=b){var o=u;for(t=Z.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else if(e=t,e==b||r)return n[u-1];return v(n,Ir(0,u-e))}},Z.take=Dt,Z.head=Dt,d(Z,function(n,t){Z.prototype[t]||(Z.prototype[t]=function(t,r){var e=this.__chain__,u=n(this.__wrapped__,t,r); -return!e&&(t==b||r&&typeof t!="function")?u:new nt(u,e)})}),Z.VERSION="1.3.1",Z.prototype.chain=function(){return this.__chain__=y,this},Z.prototype.toString=function(){return rr(this.__wrapped__)},Z.prototype.value=Gt,Z.prototype.valueOf=Gt,Ot(["join","pop","shift"],function(n){var t=ur[n];Z.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new nt(r,n):r}}),Ot(["push","reverse","sort","unshift"],function(n){var t=ur[n];Z.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this -}}),Ot(["concat","slice","splice"],function(n){var t=ur[n];Z.prototype[n]=function(){return new nt(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Z}var g,y=!0,b=null,m=!1,_=[],d=[],w=0,j=+new Date+"",k=75,x=40,C=" \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",O=/\b__p\+='';/g,E=/\b(__p\+=)''\+/g,I=/(__e\(.*?\)|\b__t\))\+'';/g,S=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,A=/\w*$/,N=/<%=([\s\S]+?)%>/g,R=RegExp("^["+C+"]*0+(?=.$)"),B=/($^)/,$=($=/\bthis\b/)&&$.test(h)&&$,D=/['\n\r\t\u2028\u2029\\]/g,F="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),T="[object Arguments]",z="[object Array]",q="[object Boolean]",W="[object Date]",P="[object Function]",K="[object Number]",L="[object Object]",M="[object RegExp]",U="[object String]",V={}; -V[P]=m,V[T]=V[z]=V[q]=V[W]=V[K]=V[L]=V[M]=V[U]=y;var G={"boolean":m,"function":y,object:y,number:m,string:m,undefined:m},H={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},J=G[typeof exports]&&exports,Q=G[typeof module]&&module&&module.exports==J&&module,X=G[typeof global]&&global;!X||X.global!==X&&X.window!==X||(n=X);var Y=h();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=Y, define(function(){return Y})):J&&!J.nodeType?Q?(Q.exports=Y)._=Y:J._=Y:n._=Y +},yr=ur.push,mr=e.setImmediate,_r=e.setTimeout,br=ur.splice,dr=or.toString,wr=ur.unshift,jr=ar.test(jr=dr.bind)&&jr,kr=ar.test(kr=nr.create)&&kr,xr=ar.test(xr=Ht.isArray)&&xr,Cr=e.isFinite,Or=e.isNaN,Er=ar.test(Er=nr.keys)&&Er,Ir=Yt.max,Sr=Yt.min,Ar=e.parseInt,Nr=Yt.random,Rr=ur.slice,Br=ar.test(e.attachEvent),$r=jr&&!/\n|true/.test(jr+Br),Dr={};Dr[z]=Ht,Dr[q]=Jt,Dr[W]=Qt,Dr[P]=Xt,Dr[L]=nr,Dr[K]=Zt,Dr[M]=tr,Dr[U]=rr,nt.prototype=Z.prototype;var Fr=Z.support={};Fr.fastBind=jr&&!$r,Z.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:Z}}; +var Tr=lr?function(n,t){var r=c();r.value=t,lr(n,"__bindData__",r),s(r)}:l,zr=xr||function(n){return n&&typeof n=="object"?dr.call(n)==z:_},qr=Er?function(n){return _t(n)?Er(n):[]}:X,Wr={"&":"&","<":"<",">":">",'"':""","'":"'"},Pr=yt(Wr),Kr=tr("("+qr(Pr).join("|")+")","g"),Lr=tr("["+qr(Wr).join("")+"]","g"),Mr=at(function(n,t,r){hr.call(n,r)?n[r]++:n[r]=1}),Ur=at(function(n,t,r){(hr.call(n,r)?n[r]:n[r]=[]).push(t)}),Vr=at(function(n,t,r){n[r]=t});$r&&Q&&typeof mr=="function"&&(Mt=function(n){if(!mt(n))throw new er; +return mr.apply(e,arguments)});var Gr=8==Ar(C+"08")?Ar:function(n,t){return Ar(dt(n)?n.replace(R,""):n,t||0)};return Z.after=function(n,t){if(!mt(t))throw new er;return function(){return 1>--n?t.apply(this,arguments):void 0}},Z.assign=J,Z.at=function(n){for(var t=-1,r=et(arguments,y,_,1),e=r.length,u=Ht(e);++t=k&&i(o?e[o]:g)}n:for(;++c(m?r(m,y):l(g,y))){for(o=u,(m||g).push(y);--o;)if(m=a[o],0>(m?r(m,y):l(e[o],y)))continue n;h.push(y)}}for(;u--;)(m=a[u])&&s(m);return p(a),p(g),h},Z.invert=yt,Z.invoke=function(n,t){var r=Rr.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Ht(typeof o=="number"?o:0);return Ot(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},Z.keys=qr,Z.map=It,Z.max=St,Z.memoize=function(n,t){function r(){var e=r.cache,u=j+(t?t.apply(this,arguments):arguments[0]); +return hr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!mt(n))throw new er;return r.cache={},r},Z.merge=function(n){var t=arguments,r=2;if(!_t(n))return n;if("number"!=typeof t[2]&&(r=t.length),3e(i,r))&&(o[r]=n)}),o},Z.once=function(n){var t,r;if(!mt(n))throw new er;return function(){return t?r:(t=y,r=n.apply(this,arguments),n=m,r)}},Z.pairs=function(n){for(var t=-1,r=qr(n),e=r.length,u=Ht(e);++tr?Ir(0,e+r):Sr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},Z.mixin=Vt,Z.noConflict=function(){return e._=ir,this},Z.parseInt=Gr,Z.random=function(n,t){n==m&&t==m&&(t=1),n=+n||0,t==m?(t=n,n=0):t=+t||0;var r=Nr();return n%1||t%1?n+Sr(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+pr(r*(t-n+1))},Z.reduce=Nt,Z.reduceRight=Rt,Z.result=function(n,t){var r=n?n[t]:g; +return mt(r)?n[t]():r},Z.runInContext=h,Z.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:qr(n).length},Z.some=Bt,Z.sortedIndex=zt,Z.template=function(n,t,r){var e=Z.templateSettings;n||(n=""),r=H({},r,e);var u,o=H({},r.imports,e.imports),e=qr(o),o=wt(o),i=0,f=r.interpolate||B,c="__p+='",f=tr((r.escape||B).source+"|"+f.source+"|"+(f===N?S:B).source+"|"+(r.evaluate||B).source+"|$","g");n.replace(f,function(t,r,e,o,f,l){return e||(e=o),c+=n.slice(i,l).replace(D,a),r&&(c+="'+__e("+r+")+'"),f&&(u=y,c+="';"+f+";__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),i=l+t.length,t +}),c+="';\n",f=r=r.variable,f||(r="obj",c="with("+r+"){"+c+"}"),c=(u?c.replace(O,""):c).replace(E,"$1").replace(I,"$1;"),c="function("+r+"){"+(f?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var l=Xt(e,"return "+c).apply(g,o)}catch(p){throw p.source=c,p}return t?l(t):(l.source=c,l)},Z.unescape=function(n){return n==m?"":rr(n).replace(Kr,st)},Z.uniqueId=function(n){var t=++w;return rr(n==m?"":n)+t +},Z.all=kt,Z.any=Bt,Z.detect=Ct,Z.findWhere=Ct,Z.foldl=Nt,Z.foldr=Rt,Z.include=jt,Z.inject=Nt,d(Z,function(n,t){Z.prototype[t]||(Z.prototype[t]=function(){var t=[this.__wrapped__],r=this.__chain__;return yr.apply(t,arguments),t=n.apply(Z,t),r?new nt(t,r):t})}),Z.first=Dt,Z.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=m){var o=u;for(t=Z.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else if(e=t,e==m||r)return n[u-1];return v(n,Ir(0,u-e))}},Z.take=Dt,Z.head=Dt,d(Z,function(n,t){Z.prototype[t]||(Z.prototype[t]=function(t,r){var e=this.__chain__,u=n(this.__wrapped__,t,r); +return!e&&(t==m||r&&typeof t!="function")?u:new nt(u,e)})}),Z.VERSION="1.3.1",Z.prototype.chain=function(){return this.__chain__=y,this},Z.prototype.toString=function(){return rr(this.__wrapped__)},Z.prototype.value=Gt,Z.prototype.valueOf=Gt,Ot(["join","pop","shift"],function(n){var t=ur[n];Z.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new nt(r,n):r}}),Ot(["push","reverse","sort","unshift"],function(n){var t=ur[n];Z.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this +}}),Ot(["concat","slice","splice"],function(n){var t=ur[n];Z.prototype[n]=function(){return new nt(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Z}var g,y=!0,m=null,_=!1,b=[],d=[],w=0,j=+new Date+"",k=75,x=40,C=" \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",O=/\b__p\+='';/g,E=/\b(__p\+=)''\+/g,I=/(__e\(.*?\)|\b__t\))\+'';/g,S=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,A=/\w*$/,N=/<%=([\s\S]+?)%>/g,R=RegExp("^["+C+"]*0+(?=.$)"),B=/($^)/,$=($=/\bthis\b/)&&$.test(h)&&$,D=/['\n\r\t\u2028\u2029\\]/g,F="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),T="[object Arguments]",z="[object Array]",q="[object Boolean]",W="[object Date]",P="[object Function]",K="[object Number]",L="[object Object]",M="[object RegExp]",U="[object String]",V={}; +V[P]=_,V[T]=V[z]=V[q]=V[W]=V[K]=V[L]=V[M]=V[U]=y;var G={"boolean":_,"function":y,object:y,number:_,string:_,undefined:_},H={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},J=G[typeof exports]&&exports,Q=G[typeof module]&&module&&module.exports==J&&module,X=G[typeof global]&&global;!X||X.global!==X&&X.window!==X||(n=X);var Y=h();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=Y, define(function(){return Y})):J&&!J.nodeType?Q?(Q.exports=Y)._=Y:J._=Y:n._=Y }(this); \ No newline at end of file diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index ef91ed88d..fb27c2031 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -108,7 +108,7 @@ * @returns {Number} Returns the sort order indicator of `1` or `-1`. */ function compareAscending(a, b) { - var ac = a.criteria; + var ac = a.criteria, bc = b.criteria; // ensure a stable sort in V8 and other engines diff --git a/dist/lodash.underscore.min.js b/dist/lodash.underscore.min.js index 83faad881..15cbd877c 100644 --- a/dist/lodash.underscore.min.js +++ b/dist/lodash.underscore.min.js @@ -3,11 +3,11 @@ * 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(n){function r(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++tbc||typeof t=="undefined")return 1;if(tu(a,c))&&(t&&a.push(c),o.push(f))}return o}function p(n){return function(r,t,e){var u={};return t=K(t,e,3),B(r,function(r,e,i){e=t(r,e,i)+"",n(u,r,e,i)}),u}}function s(n,r,t,e,u,i){var o=1&r,a=2&r,f=4&r,c=8&r,l=32&r; -if(!a&&!x(n))throw new TypeError;if(!o||a||f||l||!(Wr.fastBind||Or&&t.length))p=function(){var l=arguments,g=o?u:this;return t&&Tr.apply(l,t),e&&Er.apply(l,e),f&&l.lengthe||typeof t=="undefined")return 1;if(tu(a,l))&&(t&&a.push(l),o.push(f))}return o}function p(n){return function(r,t,e){var u={};return t=K(t,e,3),B(r,function(r,e,i){e=t(r,e,i)+"",n(u,r,e,i)}),u}}function s(n,r,t,e,u,i){var o=1&r,a=2&r,f=4&r,l=8&r,c=32&r; +if(!a&&!x(n))throw new TypeError;if(!o||a||f||c||!(Wr.fastBind||Or&&t.length))p=function(){var c=arguments,g=o?u:this;return t&&Tr.apply(c,t),e&&Er.apply(c,e),f&&c.lengthe&&(e=t,u=n)});else for(;++iu&&(u=t);return u}function M(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++targuments.length;r=a(r,e,4);var i=-1,o=n.length;if(typeof o=="number")for(u&&(t=n[++i]);++iarguments.length;return r=a(r,e,4),k(n,function(n,e,i){t=u?(u=!1,n):r(t,n,e,i)}),t}function W(n,r,t){var e;r=K(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++tt(u,o)&&i.push(o)}return i}function P(n,r,t){if(n){var e=0,u=n.length; if(typeof r!="number"&&null!=r){var i=-1;for(r=K(r,t,3);++ie?kr(0,u+e):e||0}else if(e)return e=G(n,t),n[e]===t?e:-1;return n?r(n,t,e):-1}function V(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,i=n?n.length:0;for(r=K(r,t,3);++u>>1,t(n[e])o&&(u=n.apply(i,e));else{var t=+new Date;!c&&!s&&(a=t);var p=f-(t-a);0o&&(u=n.apply(i,e));else{var t=+new Date;!l&&!s&&(a=t);var p=f-(t-a);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Sr||(v=function(n){if(E(n)){u.prototype=n;var r=new u;u.prototype=null}return r||{}}),m(arguments)||(m=function(n){return n&&typeof n=="object"?xr.call(n,"callee"):!1});var zr=Fr||function(n){return n&&typeof n=="object"?Ar.call(n)==ir:!1},Cr=function(n){var r,t=[]; if(!n||!sr[typeof n])return t;for(r in n)xr.call(n,r)&&t.push(r);return t},Pr=Br?function(n){return E(n)?Br(n):[]}:Cr,Ur={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Vr=w(Ur),Gr=RegExp("("+Pr(Vr).join("|")+")","g"),Hr=RegExp("["+Pr(Ur).join("")+"]","g"),Jr=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},Kr=function(n,r){var t;if(!n||!sr[typeof n])return n;for(t in n)if(xr.call(n,t)&&r(n[t],t,n)===nr)break;return n};x(/x/)&&(x=function(n){return typeof n=="function"&&"[object Function]"==Ar.call(n) @@ -27,11 +27,11 @@ u&&e.push(u)}return e},i.compose=function(){for(var n=arguments,r=n.length||1;r- return B(n,function(n){o[++e]=(u?r:n[r]).apply(n,t)}),o},i.keys=Pr,i.map=D,i.max=q,i.memoize=function(n,r){var t={};return function(){var e=rr+(r?r.apply(this,arguments):arguments[0]);return xr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},i.min=function(n,r,t){var e=1/0,u=e,i=-1,o=n?n.length:0;if(r||typeof o!="number")r=K(r,t,3),B(n,function(n,t,i){t=r(n,t,i),tr(t,u)&&(e[u]=n) }),e},i.once=function(n){var r,t;if(!x(n))throw new TypeError;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},i.pairs=function(n){for(var r=-1,t=Pr(n),e=t.length,u=Array(e);++rr?0:r);++nt?kr(0,e+t):Dr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},i.mixin=X,i.noConflict=function(){return n._=dr,this},i.random=function(n,r){null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0;var t=qr();return n%1||r%1?n+Dr(t*(r-n+parseFloat("1e-"+((t+"").length-1))),r):n+jr(t*(r-n+1)) +},i.every=F,i.find=R,i.has=function(n,r){return n?xr.call(n,r):!1},i.identity=Q,i.indexOf=U,i.isArguments=m,i.isArray=zr,i.isBoolean=function(n){return true===n||false===n||Ar.call(n)==or},i.isDate=function(n){return n?typeof n=="object"&&Ar.call(n)==ar:!1},i.isElement=function(n){return n?1===n.nodeType:!1},i.isEmpty=j,i.isEqual=function(n,r){return l(n,r)},i.isFinite=function(n){return Nr(n)&&!Rr(parseFloat(n))},i.isFunction=x,i.isNaN=function(n){return A(n)&&n!=+n},i.isNull=function(n){return null===n +},i.isNumber=A,i.isObject=E,i.isRegExp=function(n){return n&&sr[typeof n]?Ar.call(n)==cr:!1},i.isString=T,i.isUndefined=function(n){return typeof n=="undefined"},i.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?kr(0,e+t):Dr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},i.mixin=X,i.noConflict=function(){return n._=dr,this},i.random=function(n,r){null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0;var t=qr();return n%1||r%1?n+Dr(t*(r-n+parseFloat("1e-"+((t+"").length-1))),r):n+jr(t*(r-n+1)) },i.reduce=$,i.reduceRight=I,i.result=function(n,r){var t=n?n[r]:Y;return x(t)?n[r]():t},i.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Pr(n).length},i.some=W,i.sortedIndex=G,i.template=function(n,r,t){var u=i,o=u.templateSettings;n||(n=""),t=d({},t,o);var a=0,f="__p+='",o=t.variable;n.replace(RegExp((t.escape||tr).source+"|"+(t.interpolate||tr).source+"|"+(t.evaluate||tr).source+"|$","g"),function(r,t,u,i,o){return f+=n.slice(a,o).replace(er,e),t&&(f+="'+_.escape("+t+")+'"),i&&(f+="';"+i+";__p+='"),u&&(f+="'+((__t=("+u+"))==null?'':__t)+'"),a=o+r.length,r -}),f+="';\n",o||(o="obj",f="with("+o+"||{}){"+f+"}"),f="function("+o+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+f+"return __p}";try{var c=Function("_","return "+f)(u)}catch(l){throw l.source=f,l}return r?c(r):(c.source=f,c)},i.unescape=function(n){return null==n?"":(n+"").replace(Gr,y)},i.uniqueId=function(n){var r=++Z+"";return n?n+r:r},i.all=F,i.any=W,i.detect=R,i.findWhere=function(n,r){return z(n,r,!0)},i.foldl=$,i.foldr=I,i.include=S,i.inject=$,i.first=P,i.last=function(n,r,t){if(n){var e=0,u=n.length; +}),f+="';\n",o||(o="obj",f="with("+o+"||{}){"+f+"}"),f="function("+o+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+f+"return __p}";try{var l=Function("_","return "+f)(u)}catch(c){throw c.source=f,c}return r?l(r):(l.source=f,l)},i.unescape=function(n){return null==n?"":(n+"").replace(Gr,y)},i.uniqueId=function(n){var r=++Z+"";return n?n+r:r},i.all=F,i.any=W,i.detect=R,i.findWhere=function(n,r){return z(n,r,!0)},i.foldl=$,i.foldr=I,i.include=S,i.inject=$,i.first=P,i.last=function(n,r,t){if(n){var e=0,u=n.length; if(typeof r!="number"&&null!=r){var i=u;for(r=K(r,t,3);i--&&r(n[i],i,n);)e++}else if(e=r,null==e||t)return n[u-1];return Mr.call(n,kr(0,u-e))}},i.take=P,i.head=P,X(i),i.VERSION="1.3.1",i.prototype.chain=function(){return this.__chain__=!0,this},i.prototype.value=function(){return this.__wrapped__},B("pop push reverse shift sort splice unshift".split(" "),function(n){var r=mr[n];i.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),!Wr.spliceObjects&&0===n.length&&delete n[0],this }}),B(["concat","join","slice"],function(n){var r=mr[n];i.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=i, define(function(){return i})):hr&&!hr.nodeType?gr?(gr.exports=i)._=i:hr._=i:n._=i}(this); \ No newline at end of file diff --git a/lodash.js b/lodash.js index 38dc07c40..7a7104f71 100644 --- a/lodash.js +++ b/lodash.js @@ -240,7 +240,7 @@ * @returns {Number} Returns the sort order indicator of `1` or `-1`. */ function compareAscending(a, b) { - var ac = a.criteria; + var ac = a.criteria, bc = b.criteria; // ensure a stable sort in V8 and other engines