@lntvow/utils 2.2.10 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +104 -104
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function P(...e){return e.reduce((t,n)=>function(...r){return n(t(...r))})}function I(...e){return e.reduce((t,n)=>function(...r){return t(n(...r))})}function U(e,t=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}}const C=Object.prototype.toString,f=e=>C.call(e);let h=null;function x(e){p(e)&&(h=e)}const Z=(e,...t)=>{const n=t.length===0?"":t.length===1?t[0]:t;console.log(`%c ${e} `,"padding: 2px; border-radius: 3px; color: #fff; background: #000; font-weight: bold;",n),h&&h(e,n)},j=(...e)=>console.warn(...e),L=(...e)=>console.error(...e),D=e=>f(e)==="[object Map]",v=e=>f(e)==="[object Set]",A=e=>f(e)==="[object Date]",E=e=>f(e)==="[object RegExp]",p=e=>typeof e=="function",T=e=>typeof e=="number",N=e=>typeof e=="string",z=e=>typeof e=="symbol",d=e=>e!==null&&typeof e=="object",W=e=>d(e)&&p(e.then)&&p(e.catch),c=e=>e==null,q=e=>e===void 0,_=e=>e===null,B=e=>e!=null,K=e=>typeof e=="boolean",l=Array.isArray,m=(e,t)=>Object.hasOwn(e,t),G=(e,t)=>e!==t;function b(e){const t=new WeakMap;function n(r){if(A(r))return new Date(r);if(E(r))return new RegExp(r);if(d(r)){if(t.has(r))return t.get(r);let o={};if(l(r)){o=[],t.set(r,o);for(let i=0;i<r.length;i++)o[i]=n(r[i]);return o}t.set(r,o);for(const i in r)m(r,i)&&(o[i]=n(r[i]));return o}else return r}return n(e)}function s(e,t,n){return l(e)?V(e,t,n):Q(e,t,n)}function Q(e,t,n){const r=u(t,n);return Object.keys(e).forEach(i=>{c(t[i])?r[i]=u(e[i],n):r[i]=d(e[i])&&d(t[i])?s(e[i],t[i],n):u(t[i],n)}),r}function V(e,t,n){if(l(t)){const r=u(t,n);return r.push(...u(e,n)),r}else return u(e,n)}function u(e,t){const{clone:n=!0}=t||{};return n?b(e):e}class w extends Error{constructor(t){super(t),this.name="LntvowError"}}function S(e,t){throw new w(`[${e}] ${t}`)}function X(e,t){if(process.env.NODE_ENV!=="production"){const n=N(e)?new w(`[${e}] ${t}`):e;console.warn(n)}}function H(e,t){const{decode:n}=s({decode:!0},t||{}),r={};e.startsWith("?")&&(e=e.slice(1)),e.includes("?")&&(e=e.slice(e.indexOf("?")+1));const o=e.split("&").filter(Boolean);for(const i of o){const[g,a]=i.split("=");r[g]=n?decodeURIComponent(a):a}return r}function y(e,t){const{encode:n}=s({encode:!0},t||{}),r=[];for(const o in e){const i=e[o];r.push(`${o}=${n?encodeURIComponent(i):i}`)}return r.join("&")}function J(e,t,n){const r=s({encode:!0},n||{}),o=y(t,r);return e.includes("?")?e.endsWith("?")||e.endsWith("&")?`${e}${o}`:`${e}&${o}`:`${e}?${o}`}const Y={parse:H,stringify:y,appendQueryString:J};function k(e,t=500){let n=null;return function(...r){if(c(n))return n=Date.now(),e.apply(this,r);{const o=Date.now();if(o-n>=t)return n=o,e.apply(this,r)}}}function ee(e){return/^-?\d{1,3}\.\d{6}$/.test(e)}function te(e){return!c(e)&&/^[\dA-Za-z\u4E00-\u9FA5]+$/.test(e)}function ne(e){return!c(e)&&/^[A-Za-z\u4E00-\u9FA5]+$/.test(e)}function re(e){return!c(e)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(e)}function oe(e){return/^[\dA-Z_]+$/.test(e)}function $(e){return l(e)?e:[e]}function ie(e,t){const n=b(e);return $(t).forEach(o=>{m(n,o)&&delete n[o]}),n}function se(e,t){const n={};return $(t).forEach(o=>{m(e,o)&&(n[o]=e[o])}),n}function ue(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}function R(e,t={}){const{lowerCase:n,upperCase:r,number:o}=s({lowerCase:!0,upperCase:!0,number:!0},t);n||r||o||S("generateRandomString","lowerCase upperCase number 至少需要一个参数为true");let i="";n&&(i+="abcdefghijklmnopqrstuvwxyz"),r&&(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),o&&(i+="0123456789");let g="";for(let a=0;a<e;a++){const F=Math.floor(Math.random()*i.length);g+=i.charAt(F)}return g}function O(e){return e[Math.floor(Math.random()*e.length)]}function ce(){const e=["gmail.com","yahoo.com","outlook.com","example.com","qq.com","163.com"];return`${R(10)}@${O(e)}`}function ae(e=0,t=1e9){return Math.random()*(t-e)+e}function M(e=0,t=Number.MAX_SAFE_INTEGER){return Math.floor(Math.random()*(t-e+1))+Math.floor(e)}function de(){let e=["130","131","132","133","134","135","136","137","138","139"];return e=[...e,"145","146","147","149"],e=[...e,"150","151","152","153","155","156","157","158","159"],e=[...e,"166","167"],e=[...e,"170","171","172","173","174","175","176","177","178"],e=[...e,"180","181","182","183","184","185","186","187","188","189"],e=[...e,"190","191","192","195","196","197","198","199"],O(e)+M(0,99999999).toString().padEnd(8,"0")}function fe(e){return/^\d+$/.test(e)}function le(e){return/^[\u4E00-\u9FA5]+$/.test(e)}function ge(e){return/^[A-Za-z]+$/.test(e)}function pe(e){return/^[A-Z]+$/.test(e)}function me(e){return/^[\dA-Z]+$/.test(e)}function he(e){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(e)}function be(e){return/^[a-z]+$/.test(e)}function $e(e){return/^[\da-z]+$/.test(e)}function Oe(e){return/^[\da-z\u4E00-\u9FA5]+$/.test(e)}function Ce(e,t={}){const{integer:n}=s({integer:!0},t);return n?/^-?(0|[1-9]\d*)(\.\d+)?$/.test(e):/^-?(0|[1-9]\d*)\.\d+$/.test(e)}function Ae(e,t={}){const{integer:n}=s({integer:!0},t);return n?/^[1-9]\d*\.?\d*|^0\.\d*[1-9]\d*$/.test(e):/^[1-9]\d*\.\d*|^0\.\d*[1-9]\d*$/.test(e)}function Ee(e,t={}){const{integer:n}=s({integer:!0},t);return n?/^-[1-9]\d*\.?\d*|^-0\.\d*[1-9]\d*$/.test(e):/^-[1-9]\d*\.\d*|^-0\.\d*[1-9]\d*$/.test(e)}function Ne(e,t={}){const{integer:n}=s({integer:!0},t);return n?/^(0|[1-9]\d*)(\.\d+)?$/.test(e):/^(0|[1-9]\d*)\.\d+$/.test(e)}function we(e,t={}){const{integer:n}=s({integer:!0},t);return n?/^(-?0(\.0+)?|-(0|[1-9]\d*)(\.\d+)?)$/.test(e):/^(-?0\.0+|-(0|[1-9]\d*)\.\d+)$/.test(e)}function Se(e){return/^-?(0|[1-9]\d*)$/.test(e)}function ye(e){return/^[1-9]\d*$/.test(e)}function Re(e){return/^(0|[1-9]\d*)$/.test(e)}function Me(e){return/^-([1-9]\d*)$/.test(e)}function Fe(e){return/^(0|-(0|[1-9]\d*))$/.test(e)}function Pe(e){return/^(?:(?:\+|00)86)?1(?:(?:3\d)|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8\d)|(?:9[0-25-9]))\d{8}$/.test(e)}function Ie(e){return/^([\w-])+@([\w-])+(\.[\w-])+/.test(e)}function Ue(e){return e===""}exports.castArray=$;exports.compose=P;exports.composeRight=I;exports.debounce=U;exports.debugWarn=X;exports.deepClone=b;exports.deepMerge=s;exports.error=L;exports.excludeProperties=ie;exports.extractProperties=se;exports.generateRandomColor=ue;exports.generateRandomEmail=ce;exports.generateRandomFloat=ae;exports.generateRandomInteger=M;exports.generateRandomMobilePhone=de;exports.generateRandomString=R;exports.getRandomItem=O;exports.hasChanged=G;exports.hasOwn=m;exports.initLog=x;exports.isArray=l;exports.isBoolean=K;exports.isChinese=le;exports.isDate=A;exports.isDef=B;exports.isEmail=Ie;exports.isEmptyString=Ue;exports.isEnglishAphabet=ge;exports.isFloat=Ce;exports.isFunction=p;exports.isInteger=Se;exports.isLowerCase=be;exports.isLowerCaseAndNumber=$e;exports.isLowerCaseAndNumberAndChinese=Oe;exports.isMap=D;exports.isMobilePhone=Pe;exports.isNegativeFloat=Ee;exports.isNegativeFloatOrZero=we;exports.isNegativeInteger=Me;exports.isNegativeIntegerOrZero=Fe;exports.isNull=_;exports.isNumber=T;exports.isNumberOrNumberString=fe;exports.isObject=d;exports.isPositiveFloat=Ae;exports.isPositiveFloatOrZero=Ne;exports.isPositiveInteger=ye;exports.isPositiveIntegerOrZero=Re;exports.isPromise=W;exports.isRegExp=E;exports.isSet=v;exports.isString=N;exports.isSymbol=z;exports.isUndef=c;exports.isUndefined=q;exports.isUpperCase=pe;exports.isUpperCaseAndNumber=me;exports.isUpperCaseAndNumberAndChinese=he;exports.log=Z;exports.objectToString=C;exports.qs=Y;exports.throttle=k;exports.throwError=S;exports.toTypeString=f;exports.validatorChineseOrEnglish=ne;exports.validatorChineseOrEnglishOrNumber=te;exports.validatorLatitudeOrLongitude=ee;exports.validatorUppercaseOrNumbersOrSpecial=re;exports.validatorUppercaseOrNumbersOrUnderline=oe;exports.warn=j;
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
function
|
|
1
|
+
function P(...t) {
|
|
2
2
|
return t.reduce((n, e) => function(...r) {
|
|
3
3
|
return e(n(...r));
|
|
4
4
|
});
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function U(...t) {
|
|
7
7
|
return t.reduce((n, e) => function(...r) {
|
|
8
8
|
return n(e(...r));
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function L(t, n = 500) {
|
|
12
12
|
let e = null;
|
|
13
13
|
return function(...r) {
|
|
14
14
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
@@ -16,25 +16,25 @@ function U(t, n = 500) {
|
|
|
16
16
|
}, n);
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
let
|
|
21
|
-
function
|
|
22
|
-
|
|
19
|
+
const O = Object.prototype.toString, l = (t) => O.call(t);
|
|
20
|
+
let p = null;
|
|
21
|
+
function D(t) {
|
|
22
|
+
h(t) && (p = t);
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const z = (t, ...n) => {
|
|
25
25
|
const e = n.length === 0 ? "" : n.length === 1 ? n[0] : n;
|
|
26
26
|
console.log(
|
|
27
27
|
`%c ${t} `,
|
|
28
28
|
"padding: 2px; border-radius: 3px; color: #fff; background: #000; font-weight: bold;",
|
|
29
29
|
e
|
|
30
|
-
),
|
|
31
|
-
},
|
|
30
|
+
), p && p(t, e);
|
|
31
|
+
}, T = (...t) => console.warn(...t), W = (...t) => console.error(...t), _ = (t) => l(t) === "[object Map]", q = (t) => l(t) === "[object Set]", y = (t) => l(t) === "[object Date]", N = (t) => l(t) === "[object RegExp]", h = (t) => typeof t == "function", B = (t) => typeof t == "number", M = (t) => typeof t == "string", K = (t) => typeof t == "symbol", a = (t) => t !== null && typeof t == "object", G = (t) => a(t) && h(t.then) && h(t.catch), d = (t) => t == null, Q = (t) => t === void 0, V = (t) => t === null, X = (t) => t != null, H = (t) => typeof t == "boolean", g = Array.isArray, m = (t, n) => Object.hasOwn(t, n), J = (t, n) => t !== n;
|
|
32
32
|
function $(t) {
|
|
33
33
|
const n = /* @__PURE__ */ new WeakMap();
|
|
34
34
|
function e(r) {
|
|
35
|
-
if (
|
|
35
|
+
if (y(r))
|
|
36
36
|
return new Date(r);
|
|
37
|
-
if (
|
|
37
|
+
if (N(r))
|
|
38
38
|
return new RegExp(r);
|
|
39
39
|
if (a(r)) {
|
|
40
40
|
if (n.has(r))
|
|
@@ -56,15 +56,15 @@ function $(t) {
|
|
|
56
56
|
return e(t);
|
|
57
57
|
}
|
|
58
58
|
function s(t, n, e) {
|
|
59
|
-
return g(t) ?
|
|
59
|
+
return g(t) ? R(t, n, e) : S(t, n, e);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function S(t, n, e) {
|
|
62
62
|
const r = u(n, e);
|
|
63
63
|
return Object.keys(t).forEach((i) => {
|
|
64
64
|
d(n[i]) ? r[i] = u(t[i], e) : r[i] = a(t[i]) && a(n[i]) ? s(t[i], n[i], e) : u(n[i], e);
|
|
65
65
|
}), r;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function R(t, n, e) {
|
|
68
68
|
if (g(n)) {
|
|
69
69
|
const r = u(n, e);
|
|
70
70
|
return r.push(...u(t, e)), r;
|
|
@@ -80,16 +80,16 @@ class b extends Error {
|
|
|
80
80
|
super(n), this.name = "LntvowError";
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function x(t, n) {
|
|
84
84
|
throw new b(`[${t}] ${n}`);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Y(t, n) {
|
|
87
87
|
if (process.env.NODE_ENV !== "production") {
|
|
88
|
-
const e =
|
|
88
|
+
const e = M(t) ? new b(`[${t}] ${n}`) : t;
|
|
89
89
|
console.warn(e);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function F(t, n) {
|
|
93
93
|
const { decode: e } = s({ decode: !0 }, n || {}), r = {};
|
|
94
94
|
t.startsWith("?") && (t = t.slice(1)), t.includes("?") && (t = t.slice(t.indexOf("?") + 1));
|
|
95
95
|
const o = t.split("&").filter(Boolean);
|
|
@@ -99,7 +99,7 @@ function x(t, n) {
|
|
|
99
99
|
}
|
|
100
100
|
return r;
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function E(t, n) {
|
|
103
103
|
const { encode: e } = s({ encode: !0 }, n || {}), r = [];
|
|
104
104
|
for (const o in t) {
|
|
105
105
|
const i = t[o];
|
|
@@ -107,16 +107,16 @@ function w(t, n) {
|
|
|
107
107
|
}
|
|
108
108
|
return r.join("&");
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
const r = s({ encode: !0 }, e || {}), o =
|
|
110
|
+
function Z(t, n, e) {
|
|
111
|
+
const r = s({ encode: !0 }, e || {}), o = E(n, r);
|
|
112
112
|
return t.includes("?") ? t.endsWith("?") || t.endsWith("&") ? `${t}${o}` : `${t}&${o}` : `${t}?${o}`;
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
parse:
|
|
116
|
-
stringify:
|
|
117
|
-
appendQueryString:
|
|
114
|
+
const k = {
|
|
115
|
+
parse: F,
|
|
116
|
+
stringify: E,
|
|
117
|
+
appendQueryString: Z
|
|
118
118
|
};
|
|
119
|
-
function
|
|
119
|
+
function v(t, n = 500) {
|
|
120
120
|
let e = null;
|
|
121
121
|
return function(...r) {
|
|
122
122
|
if (d(e))
|
|
@@ -128,67 +128,67 @@ function k(t, n = 500) {
|
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function tt(t) {
|
|
132
132
|
return /^-?\d{1,3}\.\d{6}$/.test(t);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function nt(t) {
|
|
135
135
|
return !d(t) && /^[\dA-Za-z\u4E00-\u9FA5]+$/.test(t);
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function et(t) {
|
|
138
138
|
return !d(t) && /^[A-Za-z\u4E00-\u9FA5]+$/.test(t);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function rt(t) {
|
|
141
141
|
return !d(t) && /^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function ot(t) {
|
|
144
144
|
return /^[\dA-Z_]+$/.test(t);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function w(t) {
|
|
147
147
|
return g(t) ? t : [t];
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function it(t, n) {
|
|
150
150
|
const e = $(t);
|
|
151
|
-
return
|
|
151
|
+
return w(n).forEach((o) => {
|
|
152
152
|
m(e, o) && delete e[o];
|
|
153
153
|
}), e;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function st(t, n) {
|
|
156
156
|
const e = {};
|
|
157
|
-
return
|
|
157
|
+
return w(n).forEach((o) => {
|
|
158
158
|
m(t, o) && (e[o] = t[o]);
|
|
159
159
|
}), e;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function ut() {
|
|
162
162
|
return `#${Math.random().toString(16).slice(2, 8).padEnd(6, "0")}`;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function j(t, n = {}) {
|
|
165
165
|
const { lowerCase: e, upperCase: r, number: o } = s({ lowerCase: !0, upperCase: !0, number: !0 }, n);
|
|
166
|
-
e || r || o ||
|
|
166
|
+
e || r || o || x("generateRandomString", "lowerCase upperCase number 至少需要一个参数为true");
|
|
167
167
|
let i = "";
|
|
168
168
|
e && (i += "abcdefghijklmnopqrstuvwxyz"), r && (i += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), o && (i += "0123456789");
|
|
169
169
|
let f = "";
|
|
170
170
|
for (let c = 0; c < t; c++) {
|
|
171
|
-
const
|
|
172
|
-
f += i.charAt(
|
|
171
|
+
const C = Math.floor(Math.random() * i.length);
|
|
172
|
+
f += i.charAt(C);
|
|
173
173
|
}
|
|
174
174
|
return f;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function A(t) {
|
|
177
177
|
return t[Math.floor(Math.random() * t.length)];
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function ct() {
|
|
180
180
|
const t = ["gmail.com", "yahoo.com", "outlook.com", "example.com", "qq.com", "163.com"];
|
|
181
|
-
return `${
|
|
181
|
+
return `${j(10)}@${A(t)}`;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function dt(t = 0, n = 1e9) {
|
|
184
184
|
return Math.random() * (n - t) + t;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function I(t = 0, n = Number.MAX_SAFE_INTEGER) {
|
|
187
187
|
return Math.floor(Math.random() * (n - t + 1)) + Math.floor(t);
|
|
188
188
|
}
|
|
189
189
|
function ft() {
|
|
190
190
|
let t = ["130", "131", "132", "133", "134", "135", "136", "137", "138", "139"];
|
|
191
|
-
return t = [...t, "145", "146", "147", "149"], t = [...t, "150", "151", "152", "153", "155", "156", "157", "158", "159"], t = [...t, "166", "167"], t = [...t, "170", "171", "172", "173", "174", "175", "176", "177", "178"], t = [...t, "180", "181", "182", "183", "184", "185", "186", "187", "188", "189"], t = [...t, "190", "191", "192", "195", "196", "197", "198", "199"],
|
|
191
|
+
return t = [...t, "145", "146", "147", "149"], t = [...t, "150", "151", "152", "153", "155", "156", "157", "158", "159"], t = [...t, "166", "167"], t = [...t, "170", "171", "172", "173", "174", "175", "176", "177", "178"], t = [...t, "180", "181", "182", "183", "184", "185", "186", "187", "188", "189"], t = [...t, "190", "191", "192", "195", "196", "197", "198", "199"], A(t) + I(0, 99999999).toString().padEnd(8, "0");
|
|
192
192
|
}
|
|
193
193
|
function at(t) {
|
|
194
194
|
return /^\d+$/.test(t);
|
|
@@ -199,10 +199,10 @@ function lt(t) {
|
|
|
199
199
|
function gt(t) {
|
|
200
200
|
return /^[A-Za-z]+$/.test(t);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function pt(t) {
|
|
203
203
|
return /^[A-Z]+$/.test(t);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function ht(t) {
|
|
206
206
|
return /^[\dA-Z]+$/.test(t);
|
|
207
207
|
}
|
|
208
208
|
function mt(t) {
|
|
@@ -214,14 +214,14 @@ function $t(t) {
|
|
|
214
214
|
function bt(t) {
|
|
215
215
|
return /^[\da-z]+$/.test(t);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Et(t) {
|
|
218
218
|
return /^[\da-z\u4E00-\u9FA5]+$/.test(t);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function wt(t, n = {}) {
|
|
221
221
|
const { integer: e } = s({ integer: !0 }, n);
|
|
222
222
|
return e ? /^-?(0|[1-9]\d*)(\.\d+)?$/.test(t) : /^-?(0|[1-9]\d*)\.\d+$/.test(t);
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function At(t, n = {}) {
|
|
225
225
|
const { integer: e } = s({ integer: !0 }, n);
|
|
226
226
|
return e ? /^[1-9]\d*\.?\d*|^0\.\d*[1-9]\d*$/.test(t) : /^[1-9]\d*\.\d*|^0\.\d*[1-9]\d*$/.test(t);
|
|
227
227
|
}
|
|
@@ -233,14 +233,14 @@ function Ot(t, n = {}) {
|
|
|
233
233
|
const { integer: e } = s({ integer: !0 }, n);
|
|
234
234
|
return e ? /^(0|[1-9]\d*)(\.\d+)?$/.test(t) : /^(0|[1-9]\d*)\.\d+$/.test(t);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function yt(t, n = {}) {
|
|
237
237
|
const { integer: e } = s({ integer: !0 }, n);
|
|
238
238
|
return e ? /^(-?0(\.0+)?|-(0|[1-9]\d*)(\.\d+)?)$/.test(t) : /^(-?0\.0+|-(0|[1-9]\d*)\.\d+)$/.test(t);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Nt(t) {
|
|
241
241
|
return /^-?(0|[1-9]\d*)$/.test(t);
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Mt(t) {
|
|
244
244
|
return /^[1-9]\d*$/.test(t);
|
|
245
245
|
}
|
|
246
246
|
function St(t) {
|
|
@@ -264,74 +264,74 @@ function jt(t) {
|
|
|
264
264
|
return t === "";
|
|
265
265
|
}
|
|
266
266
|
export {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
267
|
+
w as castArray,
|
|
268
|
+
P as compose,
|
|
269
|
+
U as composeRight,
|
|
270
|
+
L as debounce,
|
|
271
|
+
Y as debugWarn,
|
|
272
272
|
$ as deepClone,
|
|
273
273
|
s as deepMerge,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
274
|
+
W as error,
|
|
275
|
+
it as excludeProperties,
|
|
276
|
+
st as extractProperties,
|
|
277
|
+
ut as generateRandomColor,
|
|
278
|
+
ct as generateRandomEmail,
|
|
279
|
+
dt as generateRandomFloat,
|
|
280
|
+
I as generateRandomInteger,
|
|
281
281
|
ft as generateRandomMobilePhone,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
282
|
+
j as generateRandomString,
|
|
283
|
+
A as getRandomItem,
|
|
284
|
+
J as hasChanged,
|
|
285
285
|
m as hasOwn,
|
|
286
|
-
|
|
286
|
+
D as initLog,
|
|
287
287
|
g as isArray,
|
|
288
|
-
|
|
288
|
+
H as isBoolean,
|
|
289
289
|
lt as isChinese,
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
y as isDate,
|
|
291
|
+
X as isDef,
|
|
292
292
|
Zt as isEmail,
|
|
293
293
|
jt as isEmptyString,
|
|
294
294
|
gt as isEnglishAphabet,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
295
|
+
wt as isFloat,
|
|
296
|
+
h as isFunction,
|
|
297
|
+
Nt as isInteger,
|
|
298
298
|
$t as isLowerCase,
|
|
299
299
|
bt as isLowerCaseAndNumber,
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
Et as isLowerCaseAndNumberAndChinese,
|
|
301
|
+
_ as isMap,
|
|
302
302
|
Ft as isMobilePhone,
|
|
303
303
|
Ct as isNegativeFloat,
|
|
304
|
-
|
|
304
|
+
yt as isNegativeFloatOrZero,
|
|
305
305
|
Rt as isNegativeInteger,
|
|
306
306
|
xt as isNegativeIntegerOrZero,
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
V as isNull,
|
|
308
|
+
B as isNumber,
|
|
309
309
|
at as isNumberOrNumberString,
|
|
310
310
|
a as isObject,
|
|
311
|
-
|
|
311
|
+
At as isPositiveFloat,
|
|
312
312
|
Ot as isPositiveFloatOrZero,
|
|
313
|
-
|
|
313
|
+
Mt as isPositiveInteger,
|
|
314
314
|
St as isPositiveIntegerOrZero,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
315
|
+
G as isPromise,
|
|
316
|
+
N as isRegExp,
|
|
317
|
+
q as isSet,
|
|
318
|
+
M as isString,
|
|
319
|
+
K as isSymbol,
|
|
320
320
|
d as isUndef,
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
Q as isUndefined,
|
|
322
|
+
pt as isUpperCase,
|
|
323
|
+
ht as isUpperCaseAndNumber,
|
|
324
324
|
mt as isUpperCaseAndNumberAndChinese,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
325
|
+
z as log,
|
|
326
|
+
O as objectToString,
|
|
327
|
+
k as qs,
|
|
328
|
+
v as throttle,
|
|
329
|
+
x as throwError,
|
|
330
330
|
l as toTypeString,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
331
|
+
et as validatorChineseOrEnglish,
|
|
332
|
+
nt as validatorChineseOrEnglishOrNumber,
|
|
333
|
+
tt as validatorLatitudeOrLongitude,
|
|
334
|
+
rt as validatorUppercaseOrNumbersOrSpecial,
|
|
335
|
+
ot as validatorUppercaseOrNumbersOrUnderline,
|
|
336
|
+
T as warn
|
|
337
337
|
};
|