@lntvow/utils 1.8.22 → 1.8.23
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.d.ts +1 -1
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export declare function isChineseOrEnglishOrNumber(value: string): boolean;
|
|
|
79
79
|
|
|
80
80
|
export declare const isDate: (val: unknown) => val is Date;
|
|
81
81
|
|
|
82
|
-
export declare function isDef<T>(
|
|
82
|
+
export declare function isDef<T>(val: T): val is NonNullable<T>;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* @description 校验邮箱
|
package/dist/index.mjs
CHANGED
|
@@ -4,11 +4,11 @@ function A() {
|
|
|
4
4
|
function p(n) {
|
|
5
5
|
return n > 10 ? p(10) + p(n - 10) : Math.random().toString(36).padEnd(12, "0").slice(2, n + 2);
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const g = Object.prototype.toString, f = (n) => g.call(n), E = (...n) => console.log(
|
|
8
8
|
`%c ${n[0]} `,
|
|
9
9
|
"padding: 2px; border-radius: 3px; color: #fff; background: #000; font-weight: bold;",
|
|
10
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]",
|
|
11
|
+
), S = (...n) => console.warn(...n), j = (...n) => console.error(...n), C = (n) => f(n) === "[object Map]", M = (n) => f(n) === "[object Set]", a = (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
12
|
function Z(n) {
|
|
13
13
|
return n != null;
|
|
14
14
|
}
|
|
@@ -19,7 +19,7 @@ const d = Array.isArray, y = (n, e) => Object.hasOwn(n, e), P = (n, e) => n !==
|
|
|
19
19
|
function m(n) {
|
|
20
20
|
const e = /* @__PURE__ */ new WeakMap();
|
|
21
21
|
function r(t) {
|
|
22
|
-
if (
|
|
22
|
+
if (a(t))
|
|
23
23
|
return new Date(t);
|
|
24
24
|
if (h(t))
|
|
25
25
|
return new RegExp(t);
|
|
@@ -155,7 +155,7 @@ export {
|
|
|
155
155
|
N as isBoolean,
|
|
156
156
|
J as isChineseOrEnglish,
|
|
157
157
|
H as isChineseOrEnglishOrNumber,
|
|
158
|
-
|
|
158
|
+
a as isDate,
|
|
159
159
|
Z as isDef,
|
|
160
160
|
I as isEmail,
|
|
161
161
|
G as isEmptyString,
|
|
@@ -181,7 +181,7 @@ export {
|
|
|
181
181
|
Q as isUppercaseOrNumbersOrSpecial,
|
|
182
182
|
V as isUppercaseOrNumbersOrUnderline,
|
|
183
183
|
E as log,
|
|
184
|
-
|
|
184
|
+
g as objectToString,
|
|
185
185
|
T as throttle,
|
|
186
186
|
f as toTypeString,
|
|
187
187
|
S as warn
|