mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Templates should not reference _.escape if "escape" delimiters are not used. [closes #484]
This commit is contained in:
6
dist/lodash.compat.min.js
vendored
6
dist/lodash.compat.min.js
vendored
@@ -55,9 +55,9 @@ return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]
|
||||
}),e},u.findLast=function(n,t,r){var e;return t=u.createCallback(t,r,3),vt(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e},u.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=u.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},u.findLastKey=function(n,t,r){var e;return t=u.createCallback(t,r,3),_t(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},u.has=function(n,t){return n?Dr.call(n,t):false},u.identity=sr,u.indexOf=Pt,u.isArguments=Rt,u.isArray=_e,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Tr.call(n)==tt||false
|
||||
},u.isDate=function(n){return n&&typeof n=="object"&&Tr.call(n)==rt||false},u.isElement=or,u.isEmpty=function(n){var t=true;if(!n)return t;var r=Tr.call(n),e=n.length;return r==nt||r==lt||(ce.argsClass?r==Z:Rt(n))||r==at&&typeof e=="number"&&ar(n.splice)?!e:(dt(n,function(){return t=false}),t)},u.isEqual=function(n,t,r,e){return wt(n,t,typeof r=="function"&&H(r,e,2))},u.isFinite=function(n){return Qr(n)&&!Yr(parseFloat(n))},u.isFunction=ar,u.isNaN=function(n){return lr(n)&&n!=+n},u.isNull=function(n){return null===n
|
||||
},u.isNumber=lr,u.isObject=ir,u.isPlainObject=we,u.isRegExp=function(n){var t=typeof n;return n&&("function"==t||"object"==t)&&Tr.call(n)==it||false},u.isString=fr,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?ne(0,e+r):te(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=hr,u.noConflict=function(){return n._=Rr,this},u.noop=vr,u.now=Oe,u.parseInt=Ee,u.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=ue(),te(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):xt(n,t)
|
||||
},u.reduce=Jt,u.reduceRight=Qt,u.result=function(n,t,r){var e=null==n?w:n[t];return typeof e=="undefined"?r:ar(e)?n[t]():e},u.runInContext=_,u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:je(n).length},u.some=Zt,u.sortedIndex=$t,u.template=function(n,t,r){var e=u.templateSettings;n=kr(n||""),r=er({},r,e);var o,a=er({},r.imports,e.imports),e=je(a),a=cr(a),i=0,l=r.interpolate||U,c="__p+='",l=Cr((r.escape||U).source+"|"+l.source+"|"+(l===D?W:U).source+"|"+(r.evaluate||U).source+"|$","g");
|
||||
n.replace(l,function(t,r,e,u,a,l){return e||(e=u),c+=n.slice(i,l).replace(X,f),r&&(c+="'+__e("+r+")+'"),a&&(o=true,c+="';"+a+";\n__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),i=l+t.length,t}),c+="';",l=r=r.variable,l||(r="obj",c="with("+r+"){"+c+"}"),c=(o?c.replace(T,""):c).replace(P,"$1").replace(q,"$1;"),c="function("+r+"){"+(l?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var p=_r(e,"return "+c).apply(w,a)
|
||||
}catch(s){throw s.source=c,s}return t?p(t):(p.source=c,p)},u.trim=xe,u.trimLeft=Ce,u.trimRight=ke,u.unescape=function(n){return null==n?"":(n=kr(n),0>n.indexOf(";")?n:n.replace(F,b))},u.uniqueId=function(n){var t=++R;return kr(null==n?"":n)+t},u.all=Kt,u.any=Zt,u.detect=Ut,u.findWhere=Ut,u.foldl=Jt,u.foldr=Qt,u.include=zt,u.inject=Jt,hr(function(){var n={};return dt(u,function(t,r){u.prototype[r]||(n[r]=t)}),n}(),false),u.first=Tt,u.last=function(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=o;
|
||||
},u.reduce=Jt,u.reduceRight=Qt,u.result=function(n,t,r){var e=null==n?w:n[t];return typeof e=="undefined"?r:ar(e)?n[t]():e},u.runInContext=_,u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:je(n).length},u.some=Zt,u.sortedIndex=$t,u.template=function(n,t,r){var e=u.templateSettings;n=kr(n||""),r=er({},r,e);var o,a,i=er({},r.imports,e.imports),e=je(i),i=cr(i),l=0,c=r.interpolate||U,p="__p+='",c=Cr((r.escape||U).source+"|"+c.source+"|"+(c===D?W:U).source+"|"+(r.evaluate||U).source+"|$","g");
|
||||
n.replace(c,function(t,r,e,u,i,c){return e||(e=u),p+=n.slice(l,c).replace(X,f),r&&(o=true,p+="'+__e("+r+")+'"),i&&(a=true,p+="';"+i+";\n__p+='"),e&&(p+="'+((__t=("+e+"))==null?'':__t)+'"),l=c+t.length,t}),p+="';",(r=r.variable)||(p="with(obj){"+p+"}"),p=(a?p.replace(T,""):p).replace(P,"$1").replace(q,"$1;"),p="function("+(r||"obj")+"){"+(r?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(a?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+p+"return __p}";try{var s=_r(e,"return "+p).apply(w,i)
|
||||
}catch(g){throw g.source=p,g}return t?s(t):(s.source=p,s)},u.trim=xe,u.trimLeft=Ce,u.trimRight=ke,u.unescape=function(n){return null==n?"":(n=kr(n),0>n.indexOf(";")?n:n.replace(F,b))},u.uniqueId=function(n){var t=++R;return kr(null==n?"":n)+t},u.all=Kt,u.any=Zt,u.detect=Ut,u.findWhere=Ut,u.foldl=Jt,u.foldr=Qt,u.include=zt,u.inject=Jt,hr(function(){var n={};return dt(u,function(t,r){u.prototype[r]||(n[r]=t)}),n}(),false),u.first=Tt,u.last=function(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=o;
|
||||
for(t=u.createCallback(t,r,3);a--&&t(n[a],a,n);)e++}else if(e=t,null==e||r)return n?n[o-1]:w;return e=o-e,Ft(n,0<e?e:0)},u.sample=function(n,t,r){return n&&typeof n.length!="number"?n=cr(n):ce.unindexedChars&&fr(n)&&(n=n.split("")),null==t||r?n?n[xt(0,n.length-1)]:w:(n=Yt(n),n.length=te(ne(0,t),n.length),n)},u.take=Tt,u.head=Tt,dt(u,function(n,t){var r="sample"!==t;u.prototype[t]||(u.prototype[t]=function(t,e){var u=this.__chain__,a=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new o(a,u):a
|
||||
})}),u.VERSION=I,u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.toString=function(){return kr(this.__wrapped__)},u.prototype.value=Wt,u.prototype.valueOf=Wt,ht(["join","pop","shift"],function(n){var t=Er[n];u.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new o(r,n):r}}),ht(["push","reverse","sort","unshift"],function(n){var t=Er[n];u.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ht(["concat","splice"],function(n){var t=Er[n];
|
||||
u.prototype[n]=function(){return new o(t.apply(this.__wrapped__,arguments),this.__chain__)}}),ce.spliceObjects||ht(["pop","shift","splice"],function(n){var t=Er[n],r="splice"==n;u.prototype[n]=function(){var n=this.__chain__,e=this.__wrapped__,u=t.apply(e,arguments);return 0===e.length&&delete e[0],n||r?new o(u,n):u}}),u}var w,j=1,x=2,C=4,k=8,O=16,E=32,S=40,A=40,I="2.4.1",N="__lodash@"+I+"__",R=0,T=/\b__p\+='';/g,P=/\b(__p\+=)''\+/g,q=/(__e\(.*?\)|\b__t\))\+'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,L=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,D=/<%=([\s\S]+?)%>/g,W=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,z=/\w*$/,K=/^\s*function[ \n\r\t]+\w/,M=/^0[xX]/,U=/($^)/,V=/\bthis\b/,X=/['\n\r\t\u2028\u2029\\]/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=[],J=[],Q="Array Boolean Date Error Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),Y="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Z="[object Arguments]",nt="[object Array]",tt="[object Boolean]",rt="[object Date]",et="[object Error]",ut="[object Function]",ot="[object Number]",at="[object Object]",it="[object RegExp]",lt="[object String]",ft={};
|
||||
|
||||
Reference in New Issue
Block a user