@lntvow/utils 1.8.19 → 1.8.22

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 CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vconsole");function E(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}function d(t){return t>10?d(10)+d(t-10):Math.random().toString(36).padEnd(12,"0").slice(2,t+2)}const b=Object.prototype.toString,l=t=>b.call(t),A=(...t)=>console.log(`%c ${t[0]} `,"padding: 2px; border-radius: 3px; color: #fff; background: #000; font-weight: bold;",t.slice(1).length>0?t.slice(1):""),j=(...t)=>console.warn(...t),$=(...t)=>console.error(...t),N=t=>l(t)==="[object Map]",M=t=>l(t)==="[object Set]",O=t=>l(t)==="[object Date]",S=t=>l(t)==="[object RegExp]",p=t=>typeof t=="function",U=t=>typeof t=="string",D=t=>typeof t=="symbol",f=t=>t!==null&&typeof t=="object",R=t=>f(t)&&p(t.then)&&p(t.catch),u=t=>t==null,P=t=>t===void 0,w=t=>t===null;function L(t){return t!=null}function T(t){return typeof t=="boolean"}const a=Array.isArray,y=(t,n)=>Object.hasOwn(t,n),x=(t,n)=>t!==n;function C(t){const n=new WeakMap;function r(e){if(O(e))return new Date(e);if(S(e))return new RegExp(e);if(f(e)){if(n.has(e))return n.get(e);let o={};if(a(e)){o=[],n.set(e,o);for(let i=0;i<e.length;i++)o[i]=r(e[i]);return o}n.set(e,o);for(const i in e)y(e,i)&&(o[i]=r(e[i]));return o}else return e}return r(t)}function g(t,n,r){return a(t)?I(t,n,r):F(t,n,r)}function F(t,n,r){const e=c(n,r);return Object.keys(t).forEach(i=>{u(n[i])?e[i]=c(t[i],r):e[i]=f(t[i])&&f(n[i])?g(t[i],n[i],r):c(n[i],r)}),e}function I(t,n,r){if(a(n)){const e=c(n,r);return e.push(...c(t,r)),e}else return c(t,r)}function c(t,n){const{isDeepClone:r=!0}=n||{};return r?C(t):t}function Z(t,n=1e3){let r=null;return function(...e){r&&clearTimeout(r),r=setTimeout(()=>{t.apply(this,e)},n)}}function _(t,n=1e3){let r=null;return function(...e){if(w(r))return r=Date.now(),t.apply(this,e);{const o=Date.now();if(o-r>=n)return r=o,t.apply(this,e)}}}let s={name:"LNTVOW_CONSOLE",time:3600,count:20};function z(t){s=g(s,t||{});const n=localStorage.getItem(s.name);if(!n)return;Date.now()-Number(n)>=1e3*s.time?localStorage.removeItem(s.name):new h}let m=0;function B(){m++,m>=s.count&&!localStorage.getItem(s.name)&&(localStorage.setItem(s.name,Date.now().toString()),new h)}const K={initConsole:z,showConsole:B};function V(...t){return t.reduce((n,r)=>function(...e){return r(n(...e))})}function W(...t){return t.reduce((n,r)=>function(...e){return n(r(...e))})}function q(t){return/^(?:(?:\+|00)86)?1(?:(?:3\d)|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8\d)|(?:9[1589]))\d{8}$/.test(t)}function G(t){return/^([\w-])+@([\w-])+(.[\w-])+/.test(t)}function H(t){return/^[A-Z]+$/.test(t)}function J(t){return!u(t)&&/^[a-z]+$/.test(t)}function Q(t){return/^\d+$/.test(t)}function X(t){return/^-?\d{1,3}\.\d{6}$/.test(t)}function Y(t){return t===""}function k(t){return!u(t)&&/^[\dA-Za-z\u4E00-\u9FA5]+$/.test(t)}function v(t){return!u(t)&&/^[A-Za-z\u4E00-\u9FA5]+$/.test(t)}function tt(t){return!u(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function nt(t){return/^[\dA-Z_]+$/.test(t)}function et(t){return/^[1-9]\d*$/.test(t)}function rt(t){return/^(0*[1-9]+\d*\.?\d*|0+\.\d*[1-9]+\d*)$/.test(t)}function it(t){return Array.isArray(t)?t:[t]}exports.castArray=it;exports.compose=V;exports.composeRight=W;exports.debounce=Z;exports.deepClone=C;exports.deepMerge=g;exports.error=$;exports.getRandomColor=E;exports.getRandomString=d;exports.hasChanged=x;exports.hasOwn=y;exports.isArray=a;exports.isBoolean=T;exports.isChineseOrEnglish=v;exports.isChineseOrEnglishOrNumber=k;exports.isDate=O;exports.isDef=L;exports.isEmail=G;exports.isEmptyString=Y;exports.isFunction=p;exports.isLatitudeOrLongitude=X;exports.isLowerCase=J;exports.isMap=N;exports.isMobilePhone=q;exports.isNull=w;exports.isNumber=Q;exports.isObject=f;exports.isPositiveFloat=rt;exports.isPositiveInt=et;exports.isPromise=R;exports.isRegExp=S;exports.isSet=M;exports.isString=U;exports.isSymbol=D;exports.isUndef=u;exports.isUndefined=P;exports.isUpperCase=H;exports.isUppercaseOrNumbersOrSpecial=tt;exports.isUppercaseOrNumbersOrUnderline=nt;exports.log=A;exports.nConsole=K;exports.objectToString=b;exports.throttle=_;exports.toTypeString=l;exports.warn=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function S(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}function l(t){return t>10?l(10)+l(t-10):Math.random().toString(36).padEnd(12,"0").slice(2,t+2)}const a=Object.prototype.toString,f=t=>a.call(t),w=(...t)=>console.log(`%c ${t[0]} `,"padding: 2px; border-radius: 3px; color: #fff; background: #000; font-weight: bold;",t.slice(1).length>0?t.slice(1):""),A=(...t)=>console.warn(...t),E=(...t)=>console.error(...t),C=t=>f(t)==="[object Map]",$=t=>f(t)==="[object Set]",g=t=>f(t)==="[object Date]",h=t=>f(t)==="[object RegExp]",p=t=>typeof t=="function",j=t=>typeof t=="string",M=t=>typeof t=="symbol",u=t=>t!==null&&typeof t=="object",U=t=>u(t)&&p(t.then)&&p(t.catch),c=t=>t==null,P=t=>t===void 0,b=t=>t===null;function N(t){return t!=null}function R(t){return typeof t=="boolean"}const d=Array.isArray,m=(t,e)=>Object.hasOwn(t,e),D=(t,e)=>t!==e;function O(t){const e=new WeakMap;function r(n){if(g(n))return new Date(n);if(h(n))return new RegExp(n);if(u(n)){if(e.has(n))return e.get(n);let s={};if(d(n)){s=[],e.set(n,s);for(let i=0;i<n.length;i++)s[i]=r(n[i]);return s}e.set(n,s);for(const i in n)m(n,i)&&(s[i]=r(n[i]));return s}else return n}return r(t)}function y(t,e,r){return d(t)?Z(t,e,r):T(t,e,r)}function T(t,e,r){const n=o(e,r);return Object.keys(t).forEach(i=>{c(e[i])?n[i]=o(t[i],r):n[i]=u(t[i])&&u(e[i])?y(t[i],e[i],r):o(e[i],r)}),n}function Z(t,e,r){if(d(e)){const n=o(e,r);return n.push(...o(t,r)),n}else return o(t,r)}function o(t,e){const{isDeepClone:r=!0}=e||{};return r?O(t):t}function x(t,e=1e3){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{t.apply(this,n)},e)}}function F(t,e=1e3){let r=null;return function(...n){if(b(r))return r=Date.now(),t.apply(this,n);{const s=Date.now();if(s-r>=e)return r=s,t.apply(this,n)}}}function L(...t){return t.reduce((e,r)=>function(...n){return r(e(...n))})}function I(...t){return t.reduce((e,r)=>function(...n){return e(r(...n))})}function z(t){return/^(?:(?:\+|00)86)?1(?:(?:3\d)|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8\d)|(?:9[1589]))\d{8}$/.test(t)}function _(t){return/^([\w-])+@([\w-])+(.[\w-])+/.test(t)}function B(t){return/^[A-Z]+$/.test(t)}function K(t){return!c(t)&&/^[a-z]+$/.test(t)}function W(t){return/^\d+$/.test(t)}function q(t){return/^-?\d{1,3}\.\d{6}$/.test(t)}function G(t){return t===""}function H(t){return!c(t)&&/^[\dA-Za-z\u4E00-\u9FA5]+$/.test(t)}function J(t){return!c(t)&&/^[A-Za-z\u4E00-\u9FA5]+$/.test(t)}function Q(t){return!c(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function V(t){return/^[\dA-Z_]+$/.test(t)}function X(t){return/^[1-9]\d*$/.test(t)}function Y(t){return/^\d+$/.test(t)}function k(t){return/^(0*[1-9]+\d*\.?\d*|0+\.\d*[1-9]+\d*)$/.test(t)}function v(t){return Array.isArray(t)?t:[t]}exports.castArray=v;exports.compose=L;exports.composeRight=I;exports.debounce=x;exports.deepClone=O;exports.deepMerge=y;exports.error=E;exports.getRandomColor=S;exports.getRandomString=l;exports.hasChanged=D;exports.hasOwn=m;exports.isArray=d;exports.isBoolean=R;exports.isChineseOrEnglish=J;exports.isChineseOrEnglishOrNumber=H;exports.isDate=g;exports.isDef=N;exports.isEmail=_;exports.isEmptyString=G;exports.isFunction=p;exports.isLatitudeOrLongitude=q;exports.isLowerCase=K;exports.isMap=C;exports.isMobilePhone=z;exports.isNull=b;exports.isNumber=W;exports.isObject=u;exports.isPositiveFloat=k;exports.isPositiveInt=X;exports.isPositiveIntAndZero=Y;exports.isPromise=U;exports.isRegExp=h;exports.isSet=$;exports.isString=j;exports.isSymbol=M;exports.isUndef=c;exports.isUndefined=P;exports.isUpperCase=B;exports.isUppercaseOrNumbersOrSpecial=Q;exports.isUppercaseOrNumbersOrUnderline=V;exports.log=w;exports.objectToString=a;exports.throttle=F;exports.toTypeString=f;exports.warn=A;
package/dist/index.d.ts CHANGED
@@ -63,30 +63,6 @@ export declare const hasChanged: (oldValue: unknown, newValue: unknown) => boole
63
63
 
64
64
  export declare const hasOwn: <T extends object, U extends keyof T>(target: T, key: U) => boolean;
65
65
 
66
- /**
67
- * @description 初始化
68
- * @param options 初始化配置
69
- */
70
- declare function initConsole(options?: InitConsoleOptions): void;
71
-
72
- declare interface InitConsoleOptions {
73
- /**
74
- * @description 缓存的key
75
- * @default LNTVOW_CONSOLE
76
- */
77
- name?: string;
78
- /**
79
- * @description 显示console的时间 单位s
80
- * @default 3600 一个小时
81
- */
82
- time?: number;
83
- /**
84
- * @description 显示console的事件触发次数
85
- * @default 20
86
- */
87
- count?: number;
88
- }
89
-
90
66
  export declare const isArray: (arg: any) => arg is any[];
91
67
 
92
68
  export declare function isBoolean(val: unknown): val is boolean;
@@ -153,6 +129,11 @@ export declare function isPositiveFloat(value: string): boolean;
153
129
  */
154
130
  export declare function isPositiveInt(value: string): boolean;
155
131
 
132
+ /**
133
+ * @description 校验大于0的整数
134
+ */
135
+ export declare function isPositiveIntAndZero(value: string): boolean;
136
+
156
137
  export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
157
138
 
158
139
  export declare const isRegExp: (val: unknown) => val is RegExp;
@@ -184,11 +165,6 @@ export declare function isUppercaseOrNumbersOrUnderline(value: string): boolean;
184
165
 
185
166
  export declare const log: (...arg: unknown[]) => void;
186
167
 
187
- export declare const nConsole: {
188
- initConsole: typeof initConsole;
189
- showConsole: typeof showConsole;
190
- };
191
-
192
168
  export declare const objectToString: () => string;
193
169
 
194
170
  declare interface Options {
@@ -199,11 +175,6 @@ declare interface Options {
199
175
  isDeepClone: boolean;
200
176
  }
201
177
 
202
- /**
203
- * @description 触发显示事件
204
- */
205
- declare function showConsole(): void;
206
-
207
178
  /**
208
179
  * @description 节流函数
209
180
  * @param target 目标函数
package/dist/index.mjs CHANGED
@@ -1,206 +1,188 @@
1
- import g from "vconsole";
2
- function M() {
1
+ function A() {
3
2
  return `#${Math.random().toString(16).slice(2, 8).padEnd(6, "0")}`;
4
3
  }
5
- function a(t) {
6
- return t > 10 ? a(10) + a(t - 10) : Math.random().toString(36).padEnd(12, "0").slice(2, t + 2);
4
+ function p(n) {
5
+ return n > 10 ? p(10) + p(n - 10) : Math.random().toString(36).padEnd(12, "0").slice(2, n + 2);
7
6
  }
8
- const b = Object.prototype.toString, l = (t) => b.call(t), N = (...t) => console.log(
9
- `%c ${t[0]} `,
7
+ const a = Object.prototype.toString, f = (n) => a.call(n), E = (...n) => console.log(
8
+ `%c ${n[0]} `,
10
9
  "padding: 2px; border-radius: 3px; color: #fff; background: #000; font-weight: bold;",
11
- t.slice(1).length > 0 ? t.slice(1) : ""
12
- ), x = (...t) => console.warn(...t), R = (...t) => console.error(...t), U = (t) => l(t) === "[object Map]", I = (t) => l(t) === "[object Set]", w = (t) => l(t) === "[object Date]", O = (t) => l(t) === "[object RegExp]", p = (t) => typeof t == "function", L = (t) => typeof t == "string", T = (t) => typeof t == "symbol", f = (t) => t !== null && typeof t == "object", Z = (t) => f(t) && p(t.then) && p(t.catch), u = (t) => t == null, F = (t) => t === void 0, S = (t) => t === null;
13
- function P(t) {
14
- return t != null;
15
- }
16
- function _(t) {
17
- return typeof t == "boolean";
18
- }
19
- const d = Array.isArray, y = (t, n) => Object.hasOwn(t, n), z = (t, n) => t !== n;
20
- function C(t) {
21
- const n = /* @__PURE__ */ new WeakMap();
22
- function o(e) {
23
- if (w(e))
24
- return new Date(e);
25
- if (O(e))
26
- return new RegExp(e);
27
- if (f(e)) {
28
- if (n.has(e))
29
- return n.get(e);
10
+ n.slice(1).length > 0 ? n.slice(1) : ""
11
+ ), S = (...n) => console.warn(...n), j = (...n) => console.error(...n), C = (n) => f(n) === "[object Map]", M = (n) => f(n) === "[object Set]", g = (n) => f(n) === "[object Date]", h = (n) => f(n) === "[object RegExp]", l = (n) => typeof n == "function", D = (n) => typeof n == "string", x = (n) => typeof n == "symbol", u = (n) => n !== null && typeof n == "object", R = (n) => u(n) && l(n.then) && l(n.catch), c = (n) => n == null, U = (n) => n === void 0, b = (n) => n === null;
12
+ function Z(n) {
13
+ return n != null;
14
+ }
15
+ function N(n) {
16
+ return typeof n == "boolean";
17
+ }
18
+ const d = Array.isArray, y = (n, e) => Object.hasOwn(n, e), P = (n, e) => n !== e;
19
+ function m(n) {
20
+ const e = /* @__PURE__ */ new WeakMap();
21
+ function r(t) {
22
+ if (g(t))
23
+ return new Date(t);
24
+ if (h(t))
25
+ return new RegExp(t);
26
+ if (u(t)) {
27
+ if (e.has(t))
28
+ return e.get(t);
30
29
  let i = {};
31
- if (d(e)) {
32
- i = [], n.set(e, i);
33
- for (let r = 0; r < e.length; r++)
34
- i[r] = o(e[r]);
30
+ if (d(t)) {
31
+ i = [], e.set(t, i);
32
+ for (let o = 0; o < t.length; o++)
33
+ i[o] = r(t[o]);
35
34
  return i;
36
35
  }
37
- n.set(e, i);
38
- for (const r in e)
39
- y(e, r) && (i[r] = o(e[r]));
36
+ e.set(t, i);
37
+ for (const o in t)
38
+ y(t, o) && (i[o] = r(t[o]));
40
39
  return i;
41
40
  } else
42
- return e;
41
+ return t;
43
42
  }
44
- return o(t);
43
+ return r(n);
45
44
  }
46
- function h(t, n, o) {
47
- return d(t) ? A(t, n, o) : $(t, n, o);
45
+ function w(n, e, r) {
46
+ return d(n) ? $(n, e, r) : O(n, e, r);
48
47
  }
49
- function $(t, n, o) {
50
- const e = c(n, o);
51
- return Object.keys(t).forEach((r) => {
52
- u(n[r]) ? e[r] = c(t[r], o) : e[r] = f(t[r]) && f(n[r]) ? h(t[r], n[r], o) : c(n[r], o);
53
- }), e;
48
+ function O(n, e, r) {
49
+ const t = s(e, r);
50
+ return Object.keys(n).forEach((o) => {
51
+ c(e[o]) ? t[o] = s(n[o], r) : t[o] = u(n[o]) && u(e[o]) ? w(n[o], e[o], r) : s(e[o], r);
52
+ }), t;
54
53
  }
55
- function A(t, n, o) {
56
- if (d(n)) {
57
- const e = c(n, o);
58
- return e.push(...c(t, o)), e;
54
+ function $(n, e, r) {
55
+ if (d(e)) {
56
+ const t = s(e, r);
57
+ return t.push(...s(n, r)), t;
59
58
  } else
60
- return c(t, o);
61
- }
62
- function c(t, n) {
63
- const { isDeepClone: o = !0 } = n || {};
64
- return o ? C(t) : t;
65
- }
66
- function K(t, n = 1e3) {
67
- let o = null;
68
- return function(...e) {
69
- o && clearTimeout(o), o = setTimeout(() => {
70
- t.apply(this, e);
71
- }, n);
59
+ return s(n, r);
60
+ }
61
+ function s(n, e) {
62
+ const { isDeepClone: r = !0 } = e || {};
63
+ return r ? m(n) : n;
64
+ }
65
+ function F(n, e = 1e3) {
66
+ let r = null;
67
+ return function(...t) {
68
+ r && clearTimeout(r), r = setTimeout(() => {
69
+ n.apply(this, t);
70
+ }, e);
72
71
  };
73
72
  }
74
- function V(t, n = 1e3) {
75
- let o = null;
76
- return function(...e) {
77
- if (S(o))
78
- return o = Date.now(), t.apply(this, e);
73
+ function T(n, e = 1e3) {
74
+ let r = null;
75
+ return function(...t) {
76
+ if (b(r))
77
+ return r = Date.now(), n.apply(this, t);
79
78
  {
80
79
  const i = Date.now();
81
- if (i - o >= n)
82
- return o = i, t.apply(this, e);
80
+ if (i - r >= e)
81
+ return r = i, n.apply(this, t);
83
82
  }
84
83
  };
85
84
  }
86
- let s = {
87
- name: "LNTVOW_CONSOLE",
88
- time: 3600,
89
- count: 20
90
- };
91
- function E(t) {
92
- s = h(s, t || {});
93
- const n = localStorage.getItem(s.name);
94
- if (!n)
95
- return;
96
- Date.now() - Number(n) >= 1e3 * s.time ? localStorage.removeItem(s.name) : new g();
97
- }
98
- let m = 0;
99
- function j() {
100
- m++, m >= s.count && !localStorage.getItem(s.name) && (localStorage.setItem(s.name, Date.now().toString()), new g());
101
- }
102
- const W = {
103
- initConsole: E,
104
- showConsole: j
105
- };
106
- function B(...t) {
107
- return t.reduce((n, o) => function(...e) {
108
- return o(n(...e));
85
+ function z(...n) {
86
+ return n.reduce((e, r) => function(...t) {
87
+ return r(e(...t));
109
88
  });
110
89
  }
111
- function q(...t) {
112
- return t.reduce((n, o) => function(...e) {
113
- return n(o(...e));
90
+ function L(...n) {
91
+ return n.reduce((e, r) => function(...t) {
92
+ return e(r(...t));
114
93
  });
115
94
  }
116
- function G(t) {
95
+ function _(n) {
117
96
  return /^(?:(?:\+|00)86)?1(?:(?:3\d)|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8\d)|(?:9[1589]))\d{8}$/.test(
118
- t
97
+ n
119
98
  );
120
99
  }
121
- function H(t) {
122
- return /^([\w-])+@([\w-])+(.[\w-])+/.test(t);
100
+ function I(n) {
101
+ return /^([\w-])+@([\w-])+(.[\w-])+/.test(n);
102
+ }
103
+ function K(n) {
104
+ return /^[A-Z]+$/.test(n);
123
105
  }
124
- function J(t) {
125
- return /^[A-Z]+$/.test(t);
106
+ function B(n) {
107
+ return !c(n) && /^[a-z]+$/.test(n);
126
108
  }
127
- function Q(t) {
128
- return !u(t) && /^[a-z]+$/.test(t);
109
+ function W(n) {
110
+ return /^\d+$/.test(n);
129
111
  }
130
- function X(t) {
131
- return /^\d+$/.test(t);
112
+ function q(n) {
113
+ return /^-?\d{1,3}\.\d{6}$/.test(n);
132
114
  }
133
- function Y(t) {
134
- return /^-?\d{1,3}\.\d{6}$/.test(t);
115
+ function G(n) {
116
+ return n === "";
135
117
  }
136
- function k(t) {
137
- return t === "";
118
+ function H(n) {
119
+ return !c(n) && /^[\dA-Za-z\u4E00-\u9FA5]+$/.test(n);
138
120
  }
139
- function v(t) {
140
- return !u(t) && /^[\dA-Za-z\u4E00-\u9FA5]+$/.test(t);
121
+ function J(n) {
122
+ return !c(n) && /^[A-Za-z\u4E00-\u9FA5]+$/.test(n);
141
123
  }
142
- function tt(t) {
143
- return !u(t) && /^[A-Za-z\u4E00-\u9FA5]+$/.test(t);
124
+ function Q(n) {
125
+ return !c(n) && /^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(n);
144
126
  }
145
- function nt(t) {
146
- return !u(t) && /^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t);
127
+ function V(n) {
128
+ return /^[\dA-Z_]+$/.test(n);
147
129
  }
148
- function et(t) {
149
- return /^[\dA-Z_]+$/.test(t);
130
+ function X(n) {
131
+ return /^[1-9]\d*$/.test(n);
150
132
  }
151
- function ot(t) {
152
- return /^[1-9]\d*$/.test(t);
133
+ function Y(n) {
134
+ return /^\d+$/.test(n);
153
135
  }
154
- function rt(t) {
155
- return /^(0*[1-9]+\d*\.?\d*|0+\.\d*[1-9]+\d*)$/.test(t);
136
+ function k(n) {
137
+ return /^(0*[1-9]+\d*\.?\d*|0+\.\d*[1-9]+\d*)$/.test(n);
156
138
  }
157
- function it(t) {
158
- return Array.isArray(t) ? t : [t];
139
+ function v(n) {
140
+ return Array.isArray(n) ? n : [n];
159
141
  }
160
142
  export {
161
- it as castArray,
162
- B as compose,
163
- q as composeRight,
164
- K as debounce,
165
- C as deepClone,
166
- h as deepMerge,
167
- R as error,
168
- M as getRandomColor,
169
- a as getRandomString,
170
- z as hasChanged,
143
+ v as castArray,
144
+ z as compose,
145
+ L as composeRight,
146
+ F as debounce,
147
+ m as deepClone,
148
+ w as deepMerge,
149
+ j as error,
150
+ A as getRandomColor,
151
+ p as getRandomString,
152
+ P as hasChanged,
171
153
  y as hasOwn,
172
154
  d as isArray,
173
- _ as isBoolean,
174
- tt as isChineseOrEnglish,
175
- v as isChineseOrEnglishOrNumber,
176
- w as isDate,
177
- P as isDef,
178
- H as isEmail,
179
- k as isEmptyString,
180
- p as isFunction,
181
- Y as isLatitudeOrLongitude,
182
- Q as isLowerCase,
183
- U as isMap,
184
- G as isMobilePhone,
185
- S as isNull,
186
- X as isNumber,
187
- f as isObject,
188
- rt as isPositiveFloat,
189
- ot as isPositiveInt,
190
- Z as isPromise,
191
- O as isRegExp,
192
- I as isSet,
193
- L as isString,
194
- T as isSymbol,
195
- u as isUndef,
196
- F as isUndefined,
197
- J as isUpperCase,
198
- nt as isUppercaseOrNumbersOrSpecial,
199
- et as isUppercaseOrNumbersOrUnderline,
200
- N as log,
201
- W as nConsole,
202
- b as objectToString,
203
- V as throttle,
204
- l as toTypeString,
205
- x as warn
155
+ N as isBoolean,
156
+ J as isChineseOrEnglish,
157
+ H as isChineseOrEnglishOrNumber,
158
+ g as isDate,
159
+ Z as isDef,
160
+ I as isEmail,
161
+ G as isEmptyString,
162
+ l as isFunction,
163
+ q as isLatitudeOrLongitude,
164
+ B as isLowerCase,
165
+ C as isMap,
166
+ _ as isMobilePhone,
167
+ b as isNull,
168
+ W as isNumber,
169
+ u as isObject,
170
+ k as isPositiveFloat,
171
+ X as isPositiveInt,
172
+ Y as isPositiveIntAndZero,
173
+ R as isPromise,
174
+ h as isRegExp,
175
+ M as isSet,
176
+ D as isString,
177
+ x as isSymbol,
178
+ c as isUndef,
179
+ U as isUndefined,
180
+ K as isUpperCase,
181
+ Q as isUppercaseOrNumbersOrSpecial,
182
+ V as isUppercaseOrNumbersOrUnderline,
183
+ E as log,
184
+ a as objectToString,
185
+ T as throttle,
186
+ f as toTypeString,
187
+ S as warn
206
188
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/utils",
3
- "version": "1.8.19",
3
+ "version": "1.8.22",
4
4
  "description": "工具库",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -13,13 +13,13 @@
13
13
  "types": "dist/index.d.ts",
14
14
  "devDependencies": {
15
15
  "@lntvow/eslint-config": "^8.2.5",
16
- "@rollup/plugin-node-resolve": "^15.2.1",
17
16
  "bumpp": "^9.1.1",
18
17
  "commitizen": "^4.3.0",
19
18
  "cz-conventional-changelog": "^3.3.0",
20
19
  "deepmerge": "^4.3.1",
20
+ "terser": "^5.24.0",
21
21
  "typescript": "^5.0.4",
22
- "vite": "^4.4.4",
22
+ "vite": "^5.0.0",
23
23
  "vite-plugin-dts": "3.3.1",
24
24
  "vitest": "^0.33.0"
25
25
  },