From 93383204b3c28c7568436386ee114fe0bc69a47b Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 7 Apr 2014 09:24:36 -0700 Subject: [PATCH] Rebuild dist. --- dist/lodash.compat.js | 3 +- dist/lodash.compat.min.js | 76 +++++++++++++++++++-------------------- dist/lodash.js | 3 +- dist/lodash.min.js | 74 +++++++++++++++++++------------------- dist/lodash.underscore.js | 2 +- 5 files changed, 80 insertions(+), 78 deletions(-) diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index 2eb152f09..5c7b8130a 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -3542,7 +3542,7 @@ * * @name valueOf * @memberOf _ - * @alias value + * @alias value, toJSON * @category Chaining * @returns {*} Returns the wrapped value. * @example @@ -8408,6 +8408,7 @@ // add "Chaining" functions to the wrapper lodash.prototype.chain = wrapperChain; + lodash.prototype.toJSON = wrapperValueOf; lodash.prototype.toString = wrapperToString; lodash.prototype.value = wrapperValueOf; lodash.prototype.valueOf = wrapperValueOf; diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index 65cd94f82..948da1119 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -4,66 +4,66 @@ * Build: `lodash -o ./dist/lodash.compat.js` */ ;(function(){function n(n,t){return typeof n=="undefined"?t:n}function t(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(nr||13r||8202e||13e||8202i(t,l)&&f.push(l);return f}function gt(n,t){var e=-1,r=n,u=n?n.length:0;if(typeof u=="number"&&-1i(t,l)&&f.push(l);return f}function gt(n,t){var e=-1,r=n,u=n?n.length:0;if(typeof u=="number"&&-1a(s,g)&&((u||f)&&s.push(g),c.push(p))}return c}function At(n,t){for(var e=-1,r=t(n),u=r.length,o=Re(u);++ei?0:i)}function zt(n,t,r){var u=n?n.length:0;if(typeof r=="number")r=0>r?yr(u+r,0):r||0;else if(r)return r=Zt(n,t),u&&n[r]===t?r:-1;return e(n,t,r)}function Dt(n,t,e){var r=n?n.length:0;if(typeof t!="number"&&null!=t){var u=r,i=0;for(t=o.createCallback(t,e,3);u--&&t(n[u],u,n);)i++}else i=null==t||e?1:t;return i=r-(i||0),Ut(n,0,0>i?0:i)}function Bt(n,t,e){var r=n?n.length:0;if(typeof t!="number"&&null!=t){var u=r,i=0;for(t=o.createCallback(t,e,3);u--&&t(n[u],u,n);)i++}else if(i=t,null==i||e)return n?n[r-1]:w; return i=r-(i||0),Ut(n,0>i?0:i)}function qt(n,t,e){if(typeof t!="number"&&null!=t){var r=-1,u=n?n.length:0,i=0;for(t=o.createCallback(t,e,3);++rt?0:t;return Ut(n,i)}function Ut(n,t,e){var r=-1,u=n?n.length:0;for(t=typeof t=="undefined"?0:+t||0,0>t?t=yr(u+t,0):t>u&&(t=u),e=typeof e=="undefined"?u:+e||0,0>e?e=yr(u+e,0):e>u&&(e=u),u=t>e?0:e-t,e=Re(u);++r>>1,e(n[r])e?0:e);++te?yr(r+e,0):e,-1e?0:e);++te?yr(r+e,0):e,-1u?0:u>>>0);if(t=o.createCallback(t,e,3),Lr(n))for(;++ri&&(i=l)}else t=null==t&&be(n)?u:o.createCallback(t,e,3),gt(n,function(n,e,u){e=t(n,e,u),e>r&&(r=e,i=n)});return i}function re(n,t,e,r){var u=3>arguments.length;if(t=o.createCallback(t,r,4),Lr(n)){var i=-1,a=n.length; for(u&&a&&(e=n[++i]);++iarguments.length;return t=o.createCallback(t,r,4),ht(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function oe(n){var t=-1,e=n&&n.length,r=Re(0>e?0:e>>>0);return gt(n,function(n){var e=Ot(0,++t);r[t]=r[e],r[e]=n}),r}function ie(n,t,e){var r;if(t=o.createCallback(t,e,3),Lr(n)){e=-1;for(var u=n.length;++earguments.length)return Nt(n,x,null,t);if(n)var e=n[S]?n[S][2]:n.length,r=Ut(arguments,2),e=e-r.length;return Nt(n,x|O,e,t,r)}function le(n,t,e){var r,u,o,i,a,l,f,c=0,s=false,p=true;if(!ve(n))throw new Be;if(t=0>t?0:t,true===e)var g=true,p=false;else ye(e)&&(g=e.leading,s="maxWait"in e&&yr(t,+e.maxWait||0),p="trailing"in e?e.trailing:p);var h=function(){var e=t-(Ur()-i);0>=e||e>t?(u&&Je(u),e=f,u=l=f=w,e&&(c=Ur(),o=n.apply(a,r),l||u||(r=a=null))):l=ir(h,e)},v=function(){l&&Je(l),u=l=f=w,(p||s!==t)&&(c=Ur(),o=n.apply(a,r),l||u||(r=a=null)) -};return function(){if(r=arguments,i=Ur(),a=this,f=p&&(l||!g),false===s)var e=g&&!l;else{u||g||(c=i);var y=s-(i-c),m=0>=y||y>s;m?(u&&(u=Je(u)),c=i,o=n.apply(a,r)):u||(u=ir(v,y))}return m&&l?l=Je(l):l||t===s||(l=ir(h,t)),e&&(m=true,o=n.apply(a,r)),!m||l||u||(r=a=null),o}}function fe(n){if(!ve(n))throw new Be;return function(){return!n.apply(this,arguments)}}function ce(n,t,e){var r=arguments;if(!n||2>r.length)return n;var u=0,o=r.length,i=typeof e;if("number"!=i&&"string"!=i||!r[3]||r[3][e]!==t||(o=2),3arguments.length)return t;var e=Ut(arguments);return e.push(n),ce.apply(null,e)}function pe(n){var t=[];return wt(n,function(n,e){ve(n)&&t.push(e)}),t.sort()}function ge(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ye.call(n)==Q||false}function he(n){return n&&typeof n=="object"&&1===n.nodeType&&(Or.nodeClass?-1>>0,r=-1,u=e-1,o=Re(e),i=0arguments.length)return Nt(n,x,null,t);if(n)var e=n[S]?n[S][2]:n.length,r=Ut(arguments,2),e=e-r.length;return Nt(n,x|O,e,t,r)}function le(n,t,e){var r,u,o,i,a,l,f,c=0,s=false,p=true;if(!ve(n))throw new Be;if(t=0>t?0:t,true===e)var g=true,p=false;else ye(e)&&(g=e.leading,s="maxWait"in e&&yr(t,+e.maxWait||0),p="trailing"in e?e.trailing:p);var h=function(){var e=t-(Ur()-i);0>=e||e>t?(u&&He(u),e=f,u=l=f=w,e&&(c=Ur(),o=n.apply(a,r),l||u||(r=a=null))):l=ir(h,e)},v=function(){l&&He(l),u=l=f=w,(p||s!==t)&&(c=Ur(),o=n.apply(a,r),l||u||(r=a=null)) +};return function(){if(r=arguments,i=Ur(),a=this,f=p&&(l||!g),false===s)var e=g&&!l;else{u||g||(c=i);var y=s-(i-c),m=0>=y||y>s;m?(u&&(u=He(u)),c=i,o=n.apply(a,r)):u||(u=ir(v,y))}return m&&l?l=He(l):l||t===s||(l=ir(h,t)),e&&(m=true,o=n.apply(a,r)),!m||l||u||(r=a=null),o}}function fe(n){if(!ve(n))throw new Be;return function(){return!n.apply(this,arguments)}}function ce(n,t,e){var r=arguments;if(!n||2>r.length)return n;var u=0,o=r.length,i=typeof e;if("number"!=i&&"string"!=i||!r[3]||r[3][e]!==t||(o=2),3arguments.length)return t;var e=Ut(arguments);return e.push(n),ce.apply(null,e)}function pe(n){var t=[];return wt(n,function(n,e){ve(n)&&t.push(e)}),t.sort()}function ge(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Xe.call(n)==Q||false}function he(n){return n&&typeof n=="object"&&1===n.nodeType&&(Or.nodeClass?-1>>0,r=-1,u=e-1,o=Re(e),i=0t||null==n||!gr(t))return e;n=De(n);do t%2&&(e+=n),t=Qe(t/2),n+=n;while(t);return e}function ke(n,t,e){var r=typeof n;return"function"==r||null==n?(typeof t=="undefined"||!("prototype"in n))&&n||Z(n,t,e):"object"!=r?Ie(n):Ee(n)}function Oe(n){return n}function Ee(n){n||(n={});var t=Fr(n),e=t.length,r=t[0],u=n[r];return 1!=e||u!==u||ye(u)?function(r){for(var u=e,o=true;u--&&(o=t[u],o=er.call(r,o)&&jt(r[o],n[o],null,true)););return o }:function(n){return er.call(n,r)?(n=n[r],u===n&&(0!==u||1/u==1/n)):false}}function Ae(n,t,e){var r=true,u=t&&pe(t);t&&(e||u.length)||(null==e&&(e=t),t=n,n=o,u=pe(t)),false===e?r=false:ye(e)&&"chain"in e&&(r=e.chain),e=-1;for(var i=ve(n),a=u?u.length:0;++e--n?t.apply(this,arguments):void 0}},o.assign=ce,o.at=function(n,t){var e=arguments,r=-1,u=yt(e,true,false,1),o=u.length,i=typeof t; +}}t=t?_t.defaults(mt.Object(),t,_t.pick(mt,G)):mt;var Re=t.Array,Ne=t.Boolean,Te=t.Date,Le=t.Error,We=t.Function,Fe=t.Math,$e=t.Number,Pe=t.Object,ze=t.RegExp,De=t.String,Be=t.TypeError,qe=Re.prototype,Ue=Le.prototype,Ze=Pe.prototype,Ke=De.prototype,Me=(Me=t.window)&&Me.document,Ve=t._,Je=Fe.pow(2,53)-1,Xe=Ze.toString,Ye=ze("^"+Ce(Xe).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=Fe.ceil,He=t.clearTimeout,Qe=Fe.floor,nr=We.prototype.toString,tr=Lt(tr=Pe.getPrototypeOf)&&tr,er=Ze.hasOwnProperty,rr=qe.push,ur=Ze.propertyIsEnumerable,or=Lt(or=t.Set)&&or,ir=t.setTimeout,ar=qe.splice,lr=qe.unshift,fr=function(){try{var n={},t=Lt(t=Pe.defineProperty)&&t,e=t(n,n,n)&&t +}catch(r){}return e}(),cr=Lt(cr=Ke.contains)&&cr,sr=Lt(sr=Pe.create)&&sr,pr=Lt(pr=Re.isArray)&&pr,gr=t.isFinite,hr=t.isNaN,vr=Lt(vr=Pe.keys)&&vr,yr=Fe.max,mr=Fe.min,dr=Lt(dr=Te.now)&&dr,br=t.parseInt,_r=Fe.random,wr=Lt(wr=Ke.trim)&&!wr.call(Y)&&wr,xr=Lt(xr=Ke.trimLeft)&&!xr.call(Y)&&xr,Cr=Lt(Cr=Ke.trimRight)&&!Cr.call(Y)&&Cr,jr={};jr[nt]=Re,jr[tt]=Ne,jr[et]=Te,jr[ut]=We,jr[it]=Pe,jr[ot]=$e,jr[at]=ze,jr[lt]=De;var kr={};kr[nt]=kr[et]=kr[ot]={constructor:true,toLocaleString:true,toString:true,valueOf:true},kr[tt]=kr[lt]={constructor:true,toString:true,valueOf:true},kr[rt]=kr[ut]=kr[at]={constructor:true,toString:true},kr[it]={constructor:true},function(){for(var n=H.length;n--;){var t,e=H[n]; +for(t in kr)er.call(kr,t)&&!er.call(kr[t],e)&&(kr[t][e]=false)}}(),i.prototype=o.prototype;var Or=o.support={};!function(x_){var n=function(){this.x=1},e={0:1,length:1},r=[];n.prototype={valueOf:1,y:1};for(var u in new n)r.push(u);for(var o in arguments);for(var i in"x");Or.argsClass=Xe.call(arguments)==Q,Or.argsObject=arguments.constructor==Pe&&!(arguments instanceof Re),Or.enumErrorProps=ur.call(Ue,"message")||ur.call(Ue,"name"),Or.enumPrototypes=ur.call(n,"prototype"),Or.funcDecomp=!Lt(t.WinRTError)&&V.test(_),Or.funcNames=typeof We.name=="string",Or.nonEnumStrings="0"!=i,Or.nonEnumShadows=!/valueOf/.test(r),Or.ownLast="x"!=r[0],Or.spliceObjects=(ar.call(e,0,1),!e[0]),Or.unindexedChars="xx"!="x"[0]+Pe("x")[0]; +try{Or.dom=11===Me.createDocumentFragment().nodeType}catch(a){Or.dom=false}try{Or.nodeClass=!(Xe.call(undefined)==it&&!({toString:0}+""))}catch(l){Or.nodeClass=true}try{Or.nonEnumArgs=!("1"==o&&er.call(arguments,o)&&ur.call(arguments,o))}catch(f){Or.nonEnumArgs=true}}(0,0),o.templateSettings={escape:$,evaluate:P,interpolate:z,variable:"",imports:{_:o}},sr||(d=function(){function n(){}return function(e){if(ye(e)){n.prototype=e;var r=new n;n.prototype=null}return r||t.Object()}}());var Er=or&&function(n){var t=new or,e=n?n.length:0;for(t.push=t.add;e--;)t.push(n[e]); +return t},Ar=fr?function(n,t){st.value=t,fr(n,S,st)}:Se,Sr=It(function(n,t,e){er.call(n,e)?n[e]++:n[e]=1}),Ir=It(function(n,t,e){er.call(n,e)?n[e].push(t):n[e]=[t]}),Rr=It(function(n,t,e){n[e]=t}),Nr=It(function(n,t,e){n[e?0:1].push(t)},true),Tr=te;Or.argsClass||(ge=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&er.call(n,"callee")&&!ur.call(n,"callee")||false});var Lr=pr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Xe.call(n)==nt||false};Or.dom||(he=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!Wr(n)||false +}),ve(/x/)&&(ve=function(n){return typeof n=="function"&&Xe.call(n)==ut});var Wr=tr?function(n){if(!n||Xe.call(n)!=it||!Or.argsClass&&ge(n))return false;var t=n.valueOf,e=Lt(t)&&(e=tr(t))&&tr(e);return e?n==e||tr(n)==e:Wt(n)}:Wt,Fr=vr?function(n){var t=n?n.length:0;return typeof t=="number"&&0--n?t.apply(this,arguments):void 0}},o.assign=ce,o.at=function(n,t){var e=arguments,r=-1,u=yt(e,true,false,1),o=u.length,i=typeof t; for("number"!=i&&"string"!=i||!e[2]||e[2][t]!==n||(o=1),Or.unindexedChars&&be(n)&&(n=n.split("")),e=Re(o);++rarguments.length?Nt(t,x|C,null,n):Nt(t,x|C|O,null,n,Ut(arguments,2))},o.chain=function(n){return new i(n,true)},o.compact=function(n){for(var t=-1,e=n?n.length:0,r=0,u=[];++t(p?r(p,l):i(s,l))){for(t=u;--t;){var g=o[t]; if(0>(g?r(g,l):i(n[t],l)))continue n}p&&p.push(l),s.push(l)}return s},o.invert=function(n,t){for(var e=-1,r=Fr(n),u=r.length,o={};++eo?0:o>>>0);return gt(n,function(n){var o=u?t:null!=n&&n[t];i[++r]=o?o.apply(n,e):w}),i},o.keys=Fr,o.keysIn=_e,o.map=te,o.mapValues=function(n,t,e){var r={};return t=o.createCallback(t,e,3),xt(n,function(n,e,u){r[e]=t(n,e,u) }),r},o.matches=Ee,o.max=ee,o.memoize=function(n,t){if(!ve(n))throw new Be;var e=function(){var r=e.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return er.call(r,u)?r[u]:r[u]=n.apply(this,arguments)};return e.cache={},e},o.merge=function(n,t,e){if(!n)return n;var r=arguments,u=r.length,o=typeof e;if("number"!=o&&"string"!=o||!r[3]||r[3][e]!==t||(u=2),3u?0:u>>>0);for(i||(t=o.createCallback(t,e,3)),gt(n,function(n,e,u){if(i)for(e=t.length,u=Re(e);e--;)u[e]=n[t[e]]; -else u=t(n,e,u);f[++r]={a:u,b:r,c:n}}),u=f.length,f.sort(i?l:a);u--;)f[u]=f[u].c;return f},o.tap=function(n,t,e){return t.call(e,n),n},o.throttle=function(n,t,e){var r=true,u=true;if(!ve(n))throw new Be;return false===e?r=false:ye(e)&&(r="leading"in e?!!e.leading:r,u="trailing"in e?!!e.trailing:u),ct.leading=r,ct.maxWait=+t,ct.trailing=u,le(n,t,ct)},o.times=function(n,t,e){n=0>n?0:n>>>0;var r=-1,u=Re(n);for(t=Z(t,e,1);++re?0:+e||0,r))-t.length,0<=e&&n.indexOf(t,e)==e},o.escape=function(n){return null==n?"":De(n).replace(F,s)},o.escapeRegExp=Ce,o.every=Gt,o.find=Jt,o.findIndex=$t,o.findKey=function(n,t,e){return t=o.createCallback(t,e,3),vt(n,t,xt,true)},o.findLast=function(n,t,e){return t=o.createCallback(t,e,3),vt(n,t,ht) -},o.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=o.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},o.findLastKey=function(n,t,e){return t=o.createCallback(t,e,3),vt(n,t,Ct,true)},o.has=function(n,t){return n?er.call(n,t):false},o.identity=Oe,o.indexOf=zt,o.isArguments=ge,o.isArray=Lr,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Ye.call(n)==tt||false},o.isDate=function(n){return n&&typeof n=="object"&&Ye.call(n)==et||false},o.isElement=he,o.isEmpty=function(n){var t=true; -if(!n)return t;var e=Ye.call(n),r=n.length;return-1e?yr(r+e,0):mr(e||0,r-1))+1);r--;)if(n[r]===t)return r;return-1},o.mixin=Ae,o.noConflict=function(){return t._=Ve,this},o.noop=Se,o.now=Ur,o.pad=function(n,t,e){n=null==n?"":De(n),t=+t;var r=n.length;return ru?0:u>>>0);for(i||(t=o.createCallback(t,e,3)),gt(n,function(n,e,u){if(i)for(e=t.length,u=Re(e);e--;)u[e]=n[t[e]]; +else u=t(n,e,u);f[++r]={a:u,b:r,c:n}}),u=f.length,f.sort(i?l:a);u--;)f[u]=f[u].c;return f},o.tap=function(n,t,e){return t.call(e,n),n},o.throttle=function(n,t,e){var r=true,u=true;if(!ve(n))throw new Be;return false===e?r=false:ye(e)&&(r="leading"in e?!!e.leading:r,u="trailing"in e?!!e.trailing:u),ct.leading=r,ct.maxWait=+t,ct.trailing=u,le(n,t,ct)},o.times=function(n,t,e){n=0>n?0:n>>>0;var r=-1,u=Re(n);for(t=Z(t,e,1);++re?0:+e||0,r))-t.length,0<=e&&n.indexOf(t,e)==e},o.escape=function(n){return null==n?"":De(n).replace(F,s)},o.escapeRegExp=Ce,o.every=Yt,o.find=Ht,o.findIndex=$t,o.findKey=function(n,t,e){return t=o.createCallback(t,e,3),vt(n,t,xt,true)},o.findLast=function(n,t,e){return t=o.createCallback(t,e,3),vt(n,t,ht) +},o.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=o.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},o.findLastKey=function(n,t,e){return t=o.createCallback(t,e,3),vt(n,t,Ct,true)},o.has=function(n,t){return n?er.call(n,t):false},o.identity=Oe,o.indexOf=zt,o.isArguments=ge,o.isArray=Lr,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Xe.call(n)==tt||false},o.isDate=function(n){return n&&typeof n=="object"&&Xe.call(n)==et||false},o.isElement=he,o.isEmpty=function(n){var t=true; +if(!n)return t;var e=Xe.call(n),r=n.length;return-1e?yr(r+e,0):mr(e||0,r-1))+1);r--;)if(n[r]===t)return r;return-1},o.mixin=Ae,o.noConflict=function(){return t._=Ve,this},o.noop=Se,o.now=Ur,o.pad=function(n,t,e){n=null==n?"":De(n),t=+t;var r=n.length;return re?0:+e||0,n.length),n.lastIndexOf(t,e)==e},o.template=function(n,t,e){var r=o.templateSettings;e=se({},e,r),n=De(null==n?"":n);var u,i,a=se({},e.imports,r.imports),r=Fr(a),a=xe(a),l=0,f=e.interpolate||K,c="__p+='",f=ze((e.escape||K).source+"|"+f.source+"|"+(f===z?D:K).source+"|"+(e.evaluate||K).source+"|$","g"); -n.replace(f,function(t,e,r,o,a,f){return r||(r=o),c+=n.slice(l,f).replace(X,p),e&&(u=true,c+="'+__e("+e+")+'"),a&&(i=true,c+="';"+a+";\n__p+='"),r&&(c+="'+((__t=("+r+"))==null?'':__t)+'"),l=f+t.length,t}),c+="';",(e=e.variable)||(c="with(obj){"+c+"}"),c=(i?c.replace(N,""):c).replace(T,"$1").replace(L,"$1;"),c="function("+(e||"obj")+"){"+(e?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var s=We(r,"return "+c).apply(w,a) +},o.runInContext=_,o.size=function(n){var t=n?n.length:0;return typeof t=="number"&&-1e?0:+e||0,n.length),n.lastIndexOf(t,e)==e},o.template=function(n,t,e){var r=o.templateSettings;e=se({},e,r),n=De(null==n?"":n);var u,i,a=se({},e.imports,r.imports),r=Fr(a),a=xe(a),l=0,f=e.interpolate||K,c="__p+='",f=ze((e.escape||K).source+"|"+f.source+"|"+(f===z?D:K).source+"|"+(e.evaluate||K).source+"|$","g"); +n.replace(f,function(t,e,r,o,a,f){return r||(r=o),c+=n.slice(l,f).replace(J,p),e&&(u=true,c+="'+__e("+e+")+'"),a&&(i=true,c+="';"+a+";\n__p+='"),r&&(c+="'+((__t=("+r+"))==null?'':__t)+'"),l=f+t.length,t}),c+="';",(e=e.variable)||(c="with(obj){"+c+"}"),c=(i?c.replace(N,""):c).replace(T,"$1").replace(L,"$1;"),c="function("+(e||"obj")+"){"+(e?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var s=We(r,"return "+c).apply(w,a) }catch(g){throw g.source=c,g}return t?s(t):(s.source=c,s)},o.trim=Dr,o.trimLeft=Br,o.trimRight=qr,o.truncate=function(n,t){var e=30,r="...";if(t&&ye(t))var u="separator"in t?t.separator:u,e="length"in t?+t.length||0:e,r="omission"in t?De(t.omission):r;else null!=t&&(e=+t||0);if(n=null==n?"":De(n),e>=n.length)return n;var o=e-r.length;if(1>o)return r;if(e=n.slice(0,o),null==u)return e+r;if(de(u)){if(n.slice(o).search(u)){var i,a,l=n.slice(0,o);for(u.global||(u=ze(u.source,(B.exec(u)||"")+"g")),u.lastIndex=0;i=u.exec(l);)a=i.index; -e=e.slice(0,null==a?o:a)}}else n.indexOf(u,o)!=o&&(u=e.lastIndexOf(u),-1n.indexOf(";")?n:n.replace(W,b))},o.uniqueId=function(n){var t=++I;return De(null==n?"":n)+t},o.all=Gt,o.any=ie,o.detect=Jt,o.findWhere=Jt,o.foldl=re,o.foldr=ue,o.include=Yt,o.inject=re,Ae(function(){var n={};return xt(o,function(t,e){o.prototype[e]||(n[e]=t)}),n}(),false),o.first=Pt,o.last=Bt,o.sample=function(n,t,e){return n&&typeof n.length!="number"?n=xe(n):Or.unindexedChars&&be(n)&&(n=n.split("")),null==t||e?(t=n?n.length:0,0t?0:+t||0,n.length),n) -},o.take=Pt,o.takeRight=Bt,o.takeRightWhile=Bt,o.takeWhile=Pt,o.head=Pt,xt(o,function(n,t){var e="sample"!==t;o.prototype[t]||(o.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 i(o,u):o})}),o.VERSION=A,o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.toString=function(){return De(this.__wrapped__)},o.prototype.value=Xt,o.prototype.valueOf=Xt,gt(["join","pop","shift"],function(n){var t=qe[n];o.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments); -return n?new i(e,n):e}}),gt(["push","reverse","sort","unshift"],function(n){var t=qe[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),gt(["concat","splice"],function(n){var t=qe[n];o.prototype[n]=function(){return new i(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Or.spliceObjects||gt(["pop","shift","splice"],function(n){var t=qe[n],e="splice"==n;o.prototype[n]=function(){var n=this.__chain__,r=this.__wrapped__,u=t.apply(r,arguments);return 0===r.length&&delete r[0],n||e?new i(u,n):u -}}),o}var w,x=1,C=2,j=4,k=8,O=16,E=32,A="2.4.1",S="__lodash@"+A+"__",I=0,R=/^[A-Z]+$/,N=/\b__p\+='';/g,T=/\b(__p\+=)''\+/g,L=/(__e\(.*?\)|\b__t\))\+'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,$=/<%-([\s\S]+?)%>/g,P=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,B=/\w*$/,q=/^\s*function[ \n\r\t]+\w/,U=/^0[xX]/,Z=/[\xC0-\xFF]/g,K=/($^)/,M=/[.*+?^${}()|[\]\\]/g,V=/\bthis\b/,X=/['\n\r\u2028\u2029\\]/g,Y=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[a-z]+|[0-9]+/g,G=" \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",H="Array Boolean Date Error Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),J="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Q="[object Arguments]",nt="[object Array]",tt="[object Boolean]",et="[object Date]",rt="[object Error]",ut="[object Function]",ot="[object Number]",it="[object Object]",at="[object RegExp]",lt="[object String]",ft={}; +e=e.slice(0,null==a?o:a)}}else n.indexOf(u,o)!=o&&(u=e.lastIndexOf(u),-1n.indexOf(";")?n:n.replace(W,b))},o.uniqueId=function(n){var t=++I;return De(null==n?"":n)+t},o.all=Yt,o.any=ie,o.detect=Ht,o.findWhere=Ht,o.foldl=re,o.foldr=ue,o.include=Xt,o.inject=re,Ae(function(){var n={};return xt(o,function(t,e){o.prototype[e]||(n[e]=t)}),n}(),false),o.first=Pt,o.last=Bt,o.sample=function(n,t,e){return n&&typeof n.length!="number"?n=xe(n):Or.unindexedChars&&be(n)&&(n=n.split("")),null==t||e?(t=n?n.length:0,0t?0:+t||0,n.length),n) +},o.take=Pt,o.takeRight=Bt,o.takeRightWhile=Bt,o.takeWhile=Pt,o.head=Pt,xt(o,function(n,t){var e="sample"!==t;o.prototype[t]||(o.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 i(o,u):o})}),o.VERSION=A,o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.toJSON=Jt,o.prototype.toString=function(){return De(this.__wrapped__)},o.prototype.value=Jt,o.prototype.valueOf=Jt,gt(["join","pop","shift"],function(n){var t=qe[n]; +o.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);return n?new i(e,n):e}}),gt(["push","reverse","sort","unshift"],function(n){var t=qe[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),gt(["concat","splice"],function(n){var t=qe[n];o.prototype[n]=function(){return new i(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Or.spliceObjects||gt(["pop","shift","splice"],function(n){var t=qe[n],e="splice"==n;o.prototype[n]=function(){var n=this.__chain__,r=this.__wrapped__,u=t.apply(r,arguments); +return 0===r.length&&delete r[0],n||e?new i(u,n):u}}),o}var w,x=1,C=2,j=4,k=8,O=16,E=32,A="2.4.1",S="__lodash@"+A+"__",I=0,R=/^[A-Z]+$/,N=/\b__p\+='';/g,T=/\b(__p\+=)''\+/g,L=/(__e\(.*?\)|\b__t\))\+'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,$=/<%-([\s\S]+?)%>/g,P=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,B=/\w*$/,q=/^\s*function[ \n\r\t]+\w/,U=/^0[xX]/,Z=/[\xC0-\xFF]/g,K=/($^)/,M=/[.*+?^${}()|[\]\\]/g,V=/\bthis\b/,J=/['\n\r\u2028\u2029\\]/g,X=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[a-z]+|[0-9]+/g,Y=" \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",G="Array Boolean Date Error Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),H="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Q="[object Arguments]",nt="[object Array]",tt="[object Boolean]",et="[object Date]",rt="[object Error]",ut="[object Function]",ot="[object Number]",it="[object Object]",at="[object RegExp]",lt="[object String]",ft={}; ft[ut]=false,ft[Q]=ft[nt]=ft[tt]=ft[et]=ft[ot]=ft[it]=ft[at]=ft[lt]=true;var ct={leading:false,maxWait:0,trailing:false},st={configurable:false,enumerable:false,value:null,writable:false},pt={"&":"&","<":"<",">":">",'"':""","'":"'"},gt={"&":"&","<":"<",">":">",""":'"',"'":"'"},ht={\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"AE",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss","\xd7":" ","\xf7":" "},vt={"function":true,object:true},yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},mt=vt[typeof window]&&window||this,dt=vt[typeof exports]&&exports&&!exports.nodeType&&exports,vt=vt[typeof module]&&module&&!module.nodeType&&module,bt=dt&&vt&&typeof global=="object"&&global; !bt||bt.global!==bt&&bt.window!==bt&&bt.self!==bt||(mt=bt);var bt=vt&&vt.exports===dt&&dt,_t=_();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(mt._=_t, define(function(){return _t})):dt&&vt?bt?(vt.exports=_t)._=_t:dt._=_t:mt._=_t}).call(this); \ No newline at end of file diff --git a/dist/lodash.js b/dist/lodash.js index 1c9a2b647..bb99cf939 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -3360,7 +3360,7 @@ * * @name valueOf * @memberOf _ - * @alias value + * @alias value, toJSON * @category Chaining * @returns {*} Returns the wrapped value. * @example @@ -8184,6 +8184,7 @@ // add "Chaining" functions to the wrapper lodash.prototype.chain = wrapperChain; + lodash.prototype.toJSON = wrapperValueOf; lodash.prototype.toString = wrapperToString; lodash.prototype.value = wrapperValueOf; lodash.prototype.valueOf = wrapperValueOf; diff --git a/dist/lodash.min.js b/dist/lodash.min.js index d2a9b3dc5..b5867d7e3 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -4,62 +4,62 @@ * Build: `lodash modern -o ./dist/lodash.js` */ ;(function(){function n(n,t){return typeof n=="undefined"?t:n}function t(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(nr||13r||8202e||13e||8202i(t,l)&&f.push(l);return f}function ct(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number"&&-1a(p,h)&&((u||f)&&p.push(h),c.push(s))}return c}function Ct(n,t){for(var e=-1,r=t(n),u=r.length,o=Ee(u);++ea(p,h)&&((u||f)&&p.push(h),c.push(s))}return c}function Ct(n,t){for(var e=-1,r=t(n),u=r.length,o=Ee(u);++ei?0:i)}function $t(n,t,r){var u=n?n.length:0;if(typeof r=="number")r=0>r?pr(u+r,0):r||0;else if(r)return r=qt(n,t),u&&n[r]===t?r:-1;return e(n,t,r)}function Lt(n,t,e){var r=n?n.length:0;if(typeof t!="number"&&null!=t){var u=r,i=0;for(t=o.createCallback(t,e,3);u--&&t(n[u],u,n);)i++}else i=null==t||e?1:t;return i=r-(i||0),Bt(n,0,0>i?0:i)}function zt(n,t,e){var r=n?n.length:0;if(typeof t!="number"&&null!=t){var u=r,i=0; for(t=o.createCallback(t,e,3);u--&&t(n[u],u,n);)i++}else if(i=t,null==i||e)return n?n[r-1]:_;return i=r-(i||0),Bt(n,0>i?0:i)}function Dt(n,t,e){if(typeof t!="number"&&null!=t){var r=-1,u=n?n.length:0,i=0;for(t=o.createCallback(t,e,3);++rt?0:t;return Bt(n,i)}function Bt(n,t,e){var r=-1,u=n?n.length:0;for(t=typeof t=="undefined"?0:+t||0,0>t?t=pr(u+t,0):t>u&&(t=u),e=typeof e=="undefined"?u:+e||0,0>e?e=pr(u+e,0):e>u&&(e=u),u=t>e?0:e-t,e=Ee(u);++r>>1,e(n[r])e?0:e);++t>>1,e(n[r])e?0:e);++te?pr(r+e,0):e,-1i&&(i=l)}else t=null==t&&ye(n)?u:o.createCallback(t,e,3),ct(n,function(n,e,u){e=t(n,e,u),e>r&&(r=e,i=n)});return i}function ne(n,t,e,r){var u=3>arguments.length;t=o.createCallback(t,r,4);var i=-1,a=n?n.length:0;if(typeof a=="number"&&-1arguments.length; return t=o.createCallback(t,r,4),pt(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function ee(n){var t=-1,e=n&&n.length,r=Ee(0>e?0:e>>>0);return ct(n,function(n){var e=kt(0,++t);r[t]=r[e],r[e]=n}),r}function re(n,t,e){var r;t=o.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number"&&-1arguments.length)return It(n,w,null,t);if(n)var e=n[E]?n[E][2]:n.length,r=Bt(arguments,2),e=e-r.length; return It(n,w|C,e,t,r)}function oe(n,t,e){var r,u,o,i,a,l,f,c=0,p=false,s=true;if(!se(n))throw new Le;if(t=0>t?0:t,true===e)var h=true,s=false;else he(e)&&(h=e.leading,p="maxWait"in e&&pr(t,+e.maxWait||0),s="trailing"in e?e.trailing:s);var g=function(){var e=t-(Lr()-i);0>=e||e>t?(u&&Ve(u),e=f,u=l=f=_,e&&(c=Lr(),o=n.apply(a,r),l||u||(r=a=null))):l=tr(g,e)},v=function(){l&&Ve(l),u=l=f=_,(s||p!==t)&&(c=Lr(),o=n.apply(a,r),l||u||(r=a=null))};return function(){if(r=arguments,i=Lr(),a=this,f=s&&(l||!h),false===p)var e=h&&!l; else{u||h||(c=i);var y=p-(i-c),m=0>=y||y>p;m?(u&&(u=Ve(u)),c=i,o=n.apply(a,r)):u||(u=tr(v,y))}return m&&l?l=Ve(l):l||t===p||(l=tr(g,t)),e&&(m=true,o=n.apply(a,r)),!m||l||u||(r=a=null),o}}function ie(n){if(!se(n))throw new Le;return function(){return!n.apply(this,arguments)}}function ae(n,t,e){var r=arguments;if(!n||2>r.length)return n;var u=0,o=r.length,i=typeof e;if("number"!=i&&"string"!=i||!r[3]||r[3][e]!==t||(o=2),3arguments.length)return t;var e=Bt(arguments);return e.push(n),ae.apply(null,e)}function fe(n){var t=[];return dt(n,function(n,e){se(n)&&t.push(e)}),t.sort()}function ce(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Pe.call(n)==H||false}function pe(n){return n&&typeof n=="object"&&1===n.nodeType&&-1arguments.length)return t;var e=Bt(arguments);return e.push(n),ae.apply(null,e)}function fe(n){var t=[];return dt(n,function(n,e){se(n)&&t.push(e)}),t.sort()}function ce(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Pe.call(n)==G||false}function pe(n){return n&&typeof n=="object"&&1===n.nodeType&&-1>>0,r=-1,u=e-1,o=Ee(e),i=0t||null==n||!lr(t))return e;n=$e(n);do t%2&&(e+=n),t=Xe(t/2),n+=n;while(t);return e}function xe(n,t,e){var r=typeof n;return"function"==r||null==n?(typeof t=="undefined"||!("prototype"in n))&&n||Z(n,t,e):"object"!=r?Oe(n):je(n) -}function ke(n){return n}function je(n){n||(n={});var t=Rr(n),e=t.length,r=t[0],u=n[r];return 1!=e||u!==u||he(u)?function(r){for(var u=e,o=true;u--&&(o=t[u],o=He.call(r,o)&&wt(r[o],n[o],null,true)););return o}:function(n){return He.call(n,r)?(n=n[r],u===n&&(0!==u||1/u==1/n)):false}}function Ce(n,t,e){var r=true,u=t&&fe(t);t&&(e||u.length)||(null==e&&(e=t),t=n,n=o,u=fe(t)),false===e?r=false:he(e)&&"chain"in e&&(r=e.chain),e=-1;for(var i=se(n),a=u?u.length:0;++et||null==n||!lr(t))return e;n=$e(n);do t%2&&(e+=n),t=Je(t/2),n+=n;while(t);return e}function xe(n,t,e){var r=typeof n;return"function"==r||null==n?(typeof t=="undefined"||!("prototype"in n))&&n||Z(n,t,e):"object"!=r?Ae(n):je(n) +}function ke(n){return n}function je(n){n||(n={});var t=Rr(n),e=t.length,r=t[0],u=n[r];return 1!=e||u!==u||he(u)?function(r){for(var u=e,o=true;u--&&(o=t[u],o=Ge.call(r,o)&&wt(r[o],n[o],null,true)););return o}:function(n){return Ge.call(n,r)?(n=n[r],u===n&&(0!==u||1/u==1/n)):false}}function Ce(n,t,e){var r=true,u=t&&fe(t);t&&(e||u.length)||(null==e&&(e=t),t=n,n=o,u=fe(t)),false===e?r=false:he(e)&&"chain"in e&&(r=e.chain),e=-1;for(var i=se(n),a=u?u.length:0;++e--n?t.apply(this,arguments):void 0}},o.assign=ae,o.at=function(n,t){var e=arguments,r=-1,u=ht(e,true,false,1),o=u.length,i=typeof t;for("number"!=i&&"string"!=i||!e[2]||e[2][t]!==n||(o=1),e=Ee(o);++r--n?t.apply(this,arguments):void 0}},o.assign=ae,o.at=function(n,t){var e=arguments,r=-1,u=ht(e,true,false,1),o=u.length,i=typeof t;for("number"!=i&&"string"!=i||!e[2]||e[2][t]!==n||(o=1),e=Ee(o);++rarguments.length?It(t,w|x,null,n):It(t,w|x|C,null,n,Bt(arguments,2))},o.chain=function(n){return new i(n,true)},o.compact=function(n){for(var t=-1,e=n?n.length:0,r=0,u=[];++t(s?r(s,l):i(p,l))){for(t=u;--t;){var h=o[t];if(0>(h?r(h,l):i(n[t],l)))continue n}s&&s.push(l),p.push(l)}return p},o.invert=function(n,t){for(var e=-1,r=Rr(n),u=r.length,o={};++eo?0:o>>>0); -return ct(n,function(n){var o=u?t:null!=n&&n[t];i[++r]=o?o.apply(n,e):_}),i},o.keys=Rr,o.keysIn=me,o.map=Jt,o.mapValues=function(n,t,e){var r={};return t=o.createCallback(t,e,3),bt(n,function(n,e,u){r[e]=t(n,e,u)}),r},o.matches=je,o.max=Qt,o.memoize=function(n,t){if(!se(n))throw new Le;var e=function(){var r=e.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return He.call(r,u)?r[u]:r[u]=n.apply(this,arguments)};return e.cache={},e},o.merge=function(n,t,e){if(!n)return n;var r=arguments,u=r.length,o=typeof e; +}},o.countBy=kr,o.create=function(n,t){var e=m(n);return t?ae(e,t):e},o.createCallback=xe,o.curry=function(n,t){return typeof t!="number"&&(t=+t||(n?n.length:0)),It(n,k,t)},o.debounce=oe,o.defaults=le,o.defer=function(n){if(!se(n))throw new Le;var t=Bt(arguments,1);return tr(function(){n.apply(_,t)},1)},o.delay=function(n,t){if(!se(n))throw new Le;var e=Bt(arguments,2);return tr(function(){n.apply(_,e)},t)},o.difference=function(){return ft(arguments[0],ht(arguments,true,true,1))},o.drop=Dt,o.dropRight=Lt,o.dropRightWhile=Lt,o.dropWhile=Dt,o.filter=Jt,o.flatten=function(n,t,e,r){if(!n||!n.length)return[]; +var u=typeof t;return"boolean"!=u&&null!=t&&(r=e,e=t,t=false,"number"!=u&&"string"!=u||!r||r[e]!==n||(e=null)),null!=e&&(n=Ht(n,e,r)),ht(n,t)},o.forEach=Yt,o.forEachRight=Gt,o.forIn=function(n,t,e){return t=t&&typeof e=="undefined"?t:Z(t,e,3),vt(n,t,me)},o.forInRight=function(n,t,e){return t=Z(t,e,3),yt(n,t,me)},o.forOwn=function(n,t,e){return t=t&&typeof e=="undefined"?t:Z(t,e,3),bt(n,t)},o.forOwnRight=function(n,t,e){return t=Z(t,e,3),yt(n,t,Rr)},o.functions=fe,o.groupBy=jr,o.indexBy=Cr,o.initial=Lt,o.intersection=function(){for(var n=[],t=-1,u=arguments.length,o=[],i=Rt(),a=wr&&i===e;++t(s?r(s,l):i(p,l))){for(t=u;--t;){var h=o[t];if(0>(h?r(h,l):i(n[t],l)))continue n}s&&s.push(l),p.push(l)}return p},o.invert=function(n,t){for(var e=-1,r=Rr(n),u=r.length,o={};++eo?0:o>>>0); +return ct(n,function(n){var o=u?t:null!=n&&n[t];i[++r]=o?o.apply(n,e):_}),i},o.keys=Rr,o.keysIn=me,o.map=Ht,o.mapValues=function(n,t,e){var r={};return t=o.createCallback(t,e,3),bt(n,function(n,e,u){r[e]=t(n,e,u)}),r},o.matches=je,o.max=Qt,o.memoize=function(n,t){if(!se(n))throw new Le;var e=function(){var r=e.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Ge.call(r,u)?r[u]:r[u]=n.apply(this,arguments)};return e.cache={},e},o.merge=function(n,t,e){if(!n)return n;var r=arguments,u=r.length,o=typeof e; if("number"!=o&&"string"!=o||!r[3]||r[3][e]!==t||(u=2),3u?0:u>>>0);for(i||(t=o.createCallback(t,e,3)),ct(n,function(n,e,u){if(i)for(e=t.length,u=Ee(e);e--;)u[e]=n[t[e]];else u=t(n,e,u);f[++r]={a:u,b:r,c:n}}),u=f.length,f.sort(i?l:a);u--;)f[u]=f[u].c;return f},o.tap=function(n,t,e){return t.call(e,n),n},o.throttle=function(n,t,e){var r=true,u=true;if(!se(n))throw new Le; return false===e?r=false:he(e)&&(r="leading"in e?!!e.leading:r,u="trailing"in e?!!e.trailing:u),at.leading=r,at.maxWait=+t,at.trailing=u,oe(n,t,at)},o.times=function(n,t,e){n=0>n?0:n>>>0;var r=-1,u=Ee(n);for(t=Z(t,e,1);++re?0:+e||0,r))-t.length,0<=e&&n.indexOf(t,e)==e},o.escape=function(n){return null==n?"":$e(n).replace(F,p)},o.escapeRegExp=_e,o.every=Vt,o.find=Yt,o.findIndex=Wt,o.findKey=function(n,t,e){return t=o.createCallback(t,e,3),st(n,t,bt,true) -},o.findLast=function(n,t,e){return t=o.createCallback(t,e,3),st(n,t,pt)},o.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=o.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},o.findLastKey=function(n,t,e){return t=o.createCallback(t,e,3),st(n,t,_t,true)},o.has=function(n,t){return n?He.call(n,t):false},o.identity=ke,o.indexOf=$t,o.isArguments=ce,o.isArray=Er,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Pe.call(n)==Q||false},o.isDate=function(n){return n&&typeof n=="object"&&Pe.call(n)==nt||false -},o.isElement=pe,o.isEmpty=function(n){var t=true;if(!n)return t;var e=Pe.call(n),r=n.length;return-1e?pr(r+e,0):sr(e||0,r-1))+1);r--;)if(n[r]===t)return r;return-1},o.mixin=Ce,o.noConflict=function(){return t._=Ue,this},o.noop=Ae,o.now=Lr,o.pad=function(n,t,e){n=null==n?"":$e(n),t=+t;var r=n.length;return re?0:+e||0,r))-t.length,0<=e&&n.indexOf(t,e)==e},o.escape=function(n){return null==n?"":$e(n).replace(F,p)},o.escapeRegExp=_e,o.every=Vt,o.find=Xt,o.findIndex=Wt,o.findKey=function(n,t,e){return t=o.createCallback(t,e,3),st(n,t,bt,true) +},o.findLast=function(n,t,e){return t=o.createCallback(t,e,3),st(n,t,pt)},o.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=o.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},o.findLastKey=function(n,t,e){return t=o.createCallback(t,e,3),st(n,t,_t,true)},o.has=function(n,t){return n?Ge.call(n,t):false},o.identity=ke,o.indexOf=$t,o.isArguments=ce,o.isArray=Er,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Pe.call(n)==Q||false},o.isDate=function(n){return n&&typeof n=="object"&&Pe.call(n)==nt||false +},o.isElement=pe,o.isEmpty=function(n){var t=true;if(!n)return t;var e=Pe.call(n),r=n.length;return-1e?pr(r+e,0):sr(e||0,r-1))+1);r--;)if(n[r]===t)return r;return-1},o.mixin=Ce,o.noConflict=function(){return t._=Ue,this},o.noop=Oe,o.now=Lr,o.pad=function(n,t,e){n=null==n?"":$e(n),t=+t;var r=n.length;return re?0:+e||0,n.length),n.lastIndexOf(t,e)==e},o.template=function(n,t,e){var r=o.templateSettings;e=le({},e,r),n=$e(null==n?"":n);var u,i,a=le({},e.imports,r.imports),r=Rr(a),a=be(a),l=0,f=e.interpolate||P,c="__p+='",f=Fe((e.escape||P).source+"|"+f.source+"|"+(f===z?D:P).source+"|"+(e.evaluate||P).source+"|$","g"); n.replace(f,function(t,e,r,o,a,f){return r||(r=o),c+=n.slice(l,f).replace(V,s),e&&(u=true,c+="'+__e("+e+")+'"),a&&(i=true,c+="';"+a+";\n__p+='"),r&&(c+="'+((__t=("+r+"))==null?'':__t)+'"),l=f+t.length,t}),c+="';",(e=e.variable)||(c="with(obj){"+c+"}"),c=(i?c.replace(N,""):c).replace(S,"$1").replace(T,"$1;"),c="function("+(e||"obj")+"){"+(e?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var p=Ne(r,"return "+c).apply(_,a) }catch(h){throw h.source=c,h}return t?p(t):(p.source=c,p)},o.trim=Wr,o.trimLeft=Fr,o.trimRight=$r,o.truncate=function(n,t){var e=30,r="...";if(t&&he(t))var u="separator"in t?t.separator:u,e="length"in t?+t.length||0:e,r="omission"in t?$e(t.omission):r;else null!=t&&(e=+t||0);if(n=null==n?"":$e(n),e>=n.length)return n;var o=e-r.length;if(1>o)return r;if(e=n.slice(0,o),null==u)return e+r;if(ve(u)){if(n.slice(o).search(u)){var i,a,l=n.slice(0,o);for(u.global||(u=Fe(u.source,(B.exec(u)||"")+"g")),u.lastIndex=0;i=u.exec(l);)a=i.index; -e=e.slice(0,null==a?o:a)}}else n.indexOf(u,o)!=o&&(u=e.lastIndexOf(u),-1n.indexOf(";")?n:n.replace(W,d))},o.uniqueId=function(n){var t=++I;return $e(null==n?"":n)+t},o.all=Vt,o.any=re,o.detect=Yt,o.findWhere=Yt,o.foldl=ne,o.foldr=te,o.include=Mt,o.inject=ne,Ce(function(){var n={};return bt(o,function(t,e){o.prototype[e]||(n[e]=t)}),n}(),false),o.first=Ft,o.last=zt,o.sample=function(n,t,e){return n&&typeof n.length!="number"&&(n=be(n)),null==t||e?(t=n?n.length:0,0t?0:+t||0,n.length),n) -},o.take=Ft,o.takeRight=zt,o.takeRightWhile=zt,o.takeWhile=Ft,o.head=Ft,bt(o,function(n,t){var e="sample"!==t;o.prototype[t]||(o.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 i(o,u):o})}),o.VERSION=O,o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.toString=function(){return $e(this.__wrapped__)},o.prototype.value=Kt,o.prototype.valueOf=Kt,ct(["join","pop","shift"],function(n){var t=ze[n];o.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments); -return n?new i(e,n):e}}),ct(["push","reverse","sort","unshift"],function(n){var t=ze[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ct(["concat","splice"],function(n){var t=ze[n];o.prototype[n]=function(){return new i(t.apply(this.__wrapped__,arguments),this.__chain__)}}),o}var _,w=1,x=2,k=4,j=8,C=16,A=32,O="2.4.1",E="__lodash@"+O+"__",I=0,R=/^[A-Z]+$/,N=/\b__p\+='';/g,S=/\b(__p\+=)''\+/g,T=/(__e\(.*?\)|\b__t\))\+'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,$=/<%-([\s\S]+?)%>/g,L=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,B=/\w*$/,q=/^\s*function[ \n\r\t]+\w/,U=/^0[xX]/,Z=/[\xC0-\xFF]/g,P=/($^)/,K=/[.*+?^${}()|[\]\\]/g,M=/\bthis\b/,V=/['\n\r\u2028\u2029\\]/g,X=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[a-z]+|[0-9]+/g,Y=" \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",G="Array Boolean Date Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),H="[object Arguments]",J="[object Array]",Q="[object Boolean]",nt="[object Date]",tt="[object Function]",et="[object Number]",rt="[object Object]",ut="[object RegExp]",ot="[object String]",it={}; -it[tt]=false,it[H]=it[J]=it[Q]=it[nt]=it[et]=it[rt]=it[ut]=it[ot]=true;var at={leading:false,maxWait:0,trailing:false},lt={configurable:false,enumerable:false,value:null,writable:false},ft={"&":"&","<":"<",">":">",'"':""","'":"'"},ct={"&":"&","<":"<",">":">",""":'"',"'":"'"},pt={\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"AE",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss","\xd7":" ","\xf7":" "},st={"function":true,object:true},ht={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},gt=st[typeof window]&&window||this,vt=st[typeof exports]&&exports&&!exports.nodeType&&exports,st=st[typeof module]&&module&&!module.nodeType&&module,yt=vt&&st&&typeof global=="object"&&global; +e=e.slice(0,null==a?o:a)}}else n.indexOf(u,o)!=o&&(u=e.lastIndexOf(u),-1n.indexOf(";")?n:n.replace(W,d))},o.uniqueId=function(n){var t=++I;return $e(null==n?"":n)+t},o.all=Vt,o.any=re,o.detect=Xt,o.findWhere=Xt,o.foldl=ne,o.foldr=te,o.include=Mt,o.inject=ne,Ce(function(){var n={};return bt(o,function(t,e){o.prototype[e]||(n[e]=t)}),n}(),false),o.first=Ft,o.last=zt,o.sample=function(n,t,e){return n&&typeof n.length!="number"&&(n=be(n)),null==t||e?(t=n?n.length:0,0t?0:+t||0,n.length),n) +},o.take=Ft,o.takeRight=zt,o.takeRightWhile=zt,o.takeWhile=Ft,o.head=Ft,bt(o,function(n,t){var e="sample"!==t;o.prototype[t]||(o.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 i(o,u):o})}),o.VERSION=A,o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.toJSON=Kt,o.prototype.toString=function(){return $e(this.__wrapped__)},o.prototype.value=Kt,o.prototype.valueOf=Kt,ct(["join","pop","shift"],function(n){var t=ze[n]; +o.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);return n?new i(e,n):e}}),ct(["push","reverse","sort","unshift"],function(n){var t=ze[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ct(["concat","splice"],function(n){var t=ze[n];o.prototype[n]=function(){return new i(t.apply(this.__wrapped__,arguments),this.__chain__)}}),o}var _,w=1,x=2,k=4,j=8,C=16,O=32,A="2.4.1",E="__lodash@"+A+"__",I=0,R=/^[A-Z]+$/,N=/\b__p\+='';/g,S=/\b(__p\+=)''\+/g,T=/(__e\(.*?\)|\b__t\))\+'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,$=/<%-([\s\S]+?)%>/g,L=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,B=/\w*$/,q=/^\s*function[ \n\r\t]+\w/,U=/^0[xX]/,Z=/[\xC0-\xFF]/g,P=/($^)/,K=/[.*+?^${}()|[\]\\]/g,M=/\bthis\b/,V=/['\n\r\u2028\u2029\\]/g,J=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[a-z]+|[0-9]+/g,X=" \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",Y="Array Boolean Date Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),G="[object Arguments]",H="[object Array]",Q="[object Boolean]",nt="[object Date]",tt="[object Function]",et="[object Number]",rt="[object Object]",ut="[object RegExp]",ot="[object String]",it={}; +it[tt]=false,it[G]=it[H]=it[Q]=it[nt]=it[et]=it[rt]=it[ut]=it[ot]=true;var at={leading:false,maxWait:0,trailing:false},lt={configurable:false,enumerable:false,value:null,writable:false},ft={"&":"&","<":"<",">":">",'"':""","'":"'"},ct={"&":"&","<":"<",">":">",""":'"',"'":"'"},pt={\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"AE",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss","\xd7":" ","\xf7":" "},st={"function":true,object:true},ht={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},gt=st[typeof window]&&window||this,vt=st[typeof exports]&&exports&&!exports.nodeType&&exports,st=st[typeof module]&&module&&!module.nodeType&&module,yt=vt&&st&&typeof global=="object"&&global; !yt||yt.global!==yt&&yt.window!==yt&&yt.self!==yt||(gt=yt);var yt=st&&st.exports===vt&&vt,mt=b();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(gt._=mt, define(function(){return mt})):vt&&st?yt?(st.exports=mt)._=mt:vt._=mt:gt._=mt}).call(this); \ No newline at end of file diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index bc87eca85..62085e206 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -1941,7 +1941,7 @@ * * @name valueOf * @memberOf _ - * @alias value + * @alias value, toJSON * @category Chaining * @returns {*} Returns the wrapped value. * @example