mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Add lodash.compat builds
Former-commit-id: 5edfef23bb5d55c8efaf21a1cb345dc2b0d9488b
This commit is contained in:
6
dist/lodash.compat.js
vendored
6
dist/lodash.compat.js
vendored
@@ -34,7 +34,7 @@
|
||||
var oldDash = window._;
|
||||
|
||||
/** Used to match HTML entities */
|
||||
var reEscapedHtml = /&(?:amp|lt|gt|quot|#x27);/g;
|
||||
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g;
|
||||
|
||||
/** Used to match empty string literals in compiled template source */
|
||||
var reEmptyStringLeading = /\b__p \+= '';/g,
|
||||
@@ -1009,7 +1009,7 @@
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": '''
|
||||
"'": '''
|
||||
};
|
||||
|
||||
/** Used to convert HTML entities to characters */
|
||||
@@ -4764,7 +4764,7 @@
|
||||
|
||||
/**
|
||||
* The opposite of `_.escape`, this method converts the HTML entities
|
||||
* `&`, `<`, `>`, `"`, and `'` in `string` to their
|
||||
* `&`, `<`, `>`, `"`, and `'` in `string` to their
|
||||
* corresponding characters.
|
||||
*
|
||||
* @static
|
||||
|
||||
4
dist/lodash.compat.min.js
vendored
4
dist/lodash.compat.min.js
vendored
@@ -18,10 +18,10 @@ return n}function F(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:
|
||||
});return r}function T(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var a=pr(n),o=a.length;else Xt&&A(n)&&(u=n.split(""));return t=f(t,e,4),$(n,function(n,e,f){e=a?a[--o]:--o,r=i?(i=W,u[e]):t(r,u[e],e,f)}),r}function B(n,t,r){var e;if(t=f(t,r),lr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else fr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function M(n,t,r){if(n){var e=0,u=n.length;if(typeof t=="function"){var o=-1;for(t=f(t,r);++o<u&&t(n[o],o,n);)e++
|
||||
}else if(e=t,e==Q||r)return n[0];return v(n,0,Ft($t(0,e),u))}}function P(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];lr(o)?At.apply(u,t?o:P(o)):u.push(o)}return u}function z(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?$t(0,u+r):r||0)-1;else if(r)return e=K(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function C(n,t,r){if(typeof t=="function"){var e=0,u=-1,o=n?n.length:0;for(t=f(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==Q||r?1:$t(0,t);return v(n,e)}function K(n,t,r,e){var u=0,o=n?n.length:u;
|
||||
for(r=r?f(r,e,1):V,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function L(n,t,r,e){var u=-1,o=n?n.length:0,i=[],a=i;typeof t=="function"&&(e=r,r=t,t=W);var c=!t&&75<=o;if(c)var l={};for(r&&(a=[],r=f(r,e));++u<o;){e=n[u];var p=r?r(e,u,n):e;if(c)var s=p+"",s=Ot.call(l,s)?!(a=l[s]):a=l[s]=[];(t?!u||a[a.length-1]!==p:s||0>z(a,p))&&((r||c)&&a.push(p),i.push(e))}return i}function U(n,t){return Vt||Et&&2<arguments.length?Et.call.apply(Et,arguments):i(n,t,v(arguments,2))}function V(n){return n}function G(n){$(d(n),function(t){var e=r[t]=n[t];
|
||||
r.prototype[t]=function(){var n=[this.__wrapped__];return At.apply(n,arguments),new r(e.apply(r,n))}})}function H(){return this.__wrapped__}var J=!0,Q=null,W=!1,X=typeof exports=="object"&&exports,Y=typeof global=="object"&&global;Y.global===Y&&(n=Y);var Z,nt,tt,rt=[],et={},ut=0,ot=et,it=30,ft=n._,at=/&(?:amp|lt|gt|quot|#x27);/g,ct=/\b__p\+='';/g,lt=/\b(__p\+=)''\+/g,pt=/(__e\(.*?\)|\b__t\))\+'';/g,st=/\w*$/,vt=RegExp("^"+(et.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),gt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,ht=/<%=([\s\S]+?)%>/g,yt=/($^)/,mt=/[&<>"']/g,_t=/['\n\r\t\u2028\u2029\\]/g,dt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),bt=Math.ceil,wt=rt.concat,jt=Math.floor,xt=vt.test(xt=Object.getPrototypeOf)&&xt,Ot=et.hasOwnProperty,At=rt.push,St=et.toString,Et=vt.test(Et=v.bind)&&Et,kt=vt.test(kt=Array.isArray)&&kt,qt=n.isFinite,Nt=n.isNaN,Rt=vt.test(Rt=Object.keys)&&Rt,$t=Math.max,Ft=Math.min,Dt=Math.random,It="[object Arguments]",Tt="[object Array]",Bt="[object Boolean]",Mt="[object Date]",Pt="[object Number]",zt="[object Object]",Ct="[object RegExp]",Kt="[object String]",Lt=!!n.attachEvent,Ut=Et&&!/\n|true/.test(Et+Lt),Vt=Et&&!Ut,Gt=Rt&&(Lt||Ut),Ht=(Ht={0:1,length:1},rt.splice.call(Ht,0,1),Ht[0]),Jt=J;
|
||||
r.prototype[t]=function(){var n=[this.__wrapped__];return At.apply(n,arguments),new r(e.apply(r,n))}})}function H(){return this.__wrapped__}var J=!0,Q=null,W=!1,X=typeof exports=="object"&&exports,Y=typeof global=="object"&&global;Y.global===Y&&(n=Y);var Z,nt,tt,rt=[],et={},ut=0,ot=et,it=30,ft=n._,at=/&(?:amp|lt|gt|quot|#39);/g,ct=/\b__p\+='';/g,lt=/\b(__p\+=)''\+/g,pt=/(__e\(.*?\)|\b__t\))\+'';/g,st=/\w*$/,vt=RegExp("^"+(et.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),gt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,ht=/<%=([\s\S]+?)%>/g,yt=/($^)/,mt=/[&<>"']/g,_t=/['\n\r\t\u2028\u2029\\]/g,dt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),bt=Math.ceil,wt=rt.concat,jt=Math.floor,xt=vt.test(xt=Object.getPrototypeOf)&&xt,Ot=et.hasOwnProperty,At=rt.push,St=et.toString,Et=vt.test(Et=v.bind)&&Et,kt=vt.test(kt=Array.isArray)&&kt,qt=n.isFinite,Nt=n.isNaN,Rt=vt.test(Rt=Object.keys)&&Rt,$t=Math.max,Ft=Math.min,Dt=Math.random,It="[object Arguments]",Tt="[object Array]",Bt="[object Boolean]",Mt="[object Date]",Pt="[object Number]",zt="[object Object]",Ct="[object RegExp]",Kt="[object String]",Lt=!!n.attachEvent,Ut=Et&&!/\n|true/.test(Et+Lt),Vt=Et&&!Ut,Gt=Rt&&(Lt||Ut),Ht=(Ht={0:1,length:1},rt.splice.call(Ht,0,1),Ht[0]),Jt=J;
|
||||
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)Jt=!r;Z=!/valueOf/.test(t),nt=n.propertyIsEnumerable("prototype"),tt="x"!=t[0]})(1);var Qt=arguments.constructor==Object,Wt=!h(arguments),Xt="xx"!="x"[0]+Object("x")[0];try{var Yt=St.call(document)==zt&&!({toString:0}+"")}catch(Zt){}var nr={"[object Function]":W};nr[It]=nr[Tt]=nr[Bt]=nr[Mt]=nr[Pt]=nr[zt]=nr[Ct]=nr[Kt]=J;var tr={};tr[Tt]=Array,tr[Bt]=Boolean,tr[Mt]=Date,tr[zt]=Object,tr[Pt]=Number,tr[Ct]=RegExp,tr[Kt]=String;
|
||||
var rr={"boolean":W,"function":J,object:J,number:W,string:W,undefined:W},er={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:ht,variable:"",imports:{_:r}};var ur={a:"p,v,g",l:"var a=0,b=typeof g=='number'?2:arguments.length;while(++a<b){m=arguments[a];if(m&&q[typeof m]){",h:"t[i]=m[i]",c:"}}"},or={a:"d,c,w",l:"c=c&&typeof w=='undefined'?c:e(c,w)",b:"typeof n=='number'",h:"if(c(m[i],i,d)===false)return t"},ir={l:"if(!q[typeof m])return t;"+or.l,b:W},fr=a(or);
|
||||
Wt&&(h=function(n){return n?Ot.call(n,"callee"):W});var ar=a(or,ir,{m:W}),cr=a(or,ir),lr=kt||function(n){return Qt&&n instanceof Array||St.call(n)==Tt},pr=Rt?function(n){return x(n)?nt&&typeof n=="function"||Jt&&n.length&&h(n)?m(n):Rt(n):[]}:m,sr={"&":"&","<":"<",">":">",'"':""","'":"'"},vr=b(sr),gr=a(ur),hr=a(ur,{h:"if(t[i]==null)"+ur.h});j(/x/)&&(j=function(n){return n instanceof Function||"[object Function]"==St.call(n)});var yr=xt?function(n){if(!n||typeof n!="object")return W;
|
||||
Wt&&(h=function(n){return n?Ot.call(n,"callee"):W});var ar=a(or,ir,{m:W}),cr=a(or,ir),lr=kt||function(n){return Qt&&n instanceof Array||St.call(n)==Tt},pr=Rt?function(n){return x(n)?nt&&typeof n=="function"||Jt&&n.length&&h(n)?m(n):Rt(n):[]}:m,sr={"&":"&","<":"<",">":">",'"':""","'":"'"},vr=b(sr),gr=a(ur),hr=a(ur,{h:"if(t[i]==null)"+ur.h});j(/x/)&&(j=function(n){return n instanceof Function||"[object Function]"==St.call(n)});var yr=xt?function(n){if(!n||typeof n!="object")return W;
|
||||
var t=n.valueOf,r=typeof t=="function"&&(r=xt(t))&&xt(r);return r?n==r||xt(n)==r&&!h(n):y(n)}:y,mr=F,_r=N;r.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},r.assign=gr,r.at=function(n){var t=-1,r=wt.apply(rt,v(arguments,1)),e=r.length,u=Array(e);for(Xt&&A(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},r.bind=U,r.bindAll=function(n){for(var t=wt.apply(rt,arguments),r=1<t.length?0:(t=d(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=U(n[u],n)}return n},r.bindKey=function(n,t){return i(n,t,v(arguments,2))
|
||||
},r.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},r.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},r.countBy=function(n,t,r){var e={};return t=f(t,r),$(n,function(n,r,u){r=t(n,r,u)+"",Ot.call(e,r)?e[r]++:e[r]=1}),e},r.debounce=function(n,t,r){function e(){f=Q,r||(o=n.apply(i,u))}var u,o,i,f;return function(){var a=r&&!f;return u=arguments,i=this,clearTimeout(f),f=setTimeout(e,t),a&&(o=n.apply(i,u)),o
|
||||
}},r.defaults=hr,r.defer=function(n){var r=v(arguments,1);return setTimeout(function(){n.apply(t,r)},1)},r.delay=function(n,r){var e=v(arguments,2);return setTimeout(function(){n.apply(t,e)},r)},r.difference=function(n){for(var t=-1,r=n?n.length:0,u=wt.apply(rt,arguments),u=e(u,r),o=[];++t<r;){var i=n[t];u(i)||o.push(i)}return o},r.filter=N,r.flatten=P,r.forEach=$,r.forIn=ar,r.forOwn=cr,r.functions=d,r.groupBy=function(n,t,r){var e={};return t=f(t,r),$(n,function(n,r,u){r=t(n,r,u)+"",(Ot.call(e,r)?e[r]:e[r]=[]).push(n)
|
||||
|
||||
Reference in New Issue
Block a user