minutool 1.0.5 → 1.0.6
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 +14 -0
- package/dist/minutool.js +182 -175
- package/dist/minutool.js.map +1 -1
- package/dist/minutool.umd.cjs +3 -3
- package/dist/minutool.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -445,6 +445,13 @@ export declare const findOne: (selector: string | HTMLElement, parent?: Document
|
|
|
445
445
|
*/
|
|
446
446
|
export declare const fixBaseUrl: (url: string, baseUrl: string) => string;
|
|
447
447
|
|
|
448
|
+
/**
|
|
449
|
+
* 将字符串转换为浮点数
|
|
450
|
+
* @param {string} str - 要转换的字符串
|
|
451
|
+
* @param {number} [defaultVal=0] - 转换失败时的默认值
|
|
452
|
+
*/
|
|
453
|
+
export declare const floatVal: (str: string, defaultVal?: number) => number;
|
|
454
|
+
|
|
448
455
|
/**
|
|
449
456
|
* 格式化日期(以 PHP 方式格式化)
|
|
450
457
|
* @param {string} format - 格式化字符串(支持 PHP date 函数的格式)
|
|
@@ -592,6 +599,13 @@ export declare const insertStyleSheet: (styleSheetStr: string, id?: string, doc?
|
|
|
592
599
|
*/
|
|
593
600
|
export declare const isBodyInit: (value: any) => value is BodyInit;
|
|
594
601
|
|
|
602
|
+
/**
|
|
603
|
+
* 判断字符串是否包含中文字符
|
|
604
|
+
* @param {string} str - 要判断的字符串
|
|
605
|
+
* @returns {boolean} 返回是否包含中文字符
|
|
606
|
+
*/
|
|
607
|
+
export declare const isChinese: (str: string) => boolean;
|
|
608
|
+
|
|
595
609
|
/**
|
|
596
610
|
* 判断对象是否为空
|
|
597
611
|
* @param obj - 要判断的对象
|