minutool 1.0.7 → 1.0.9

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 CHANGED
@@ -295,6 +295,13 @@ export declare function deepClone<T>(obj: T): T;
295
295
  */
296
296
  export declare const deleteCookie: (name: string, path?: string, domain?: string) => void;
297
297
 
298
+ /**
299
+ * 删除 Cookie 在所有路径和子域名下的所有实例
300
+ * @param {string} name - Cookie 名称
301
+ * @param {string} [domain] - Cookie 域名,默认为当前域名
302
+ */
303
+ export declare const deleteCookieAllPaths: (name: string, domain?: string) => void;
304
+
298
305
  /**
299
306
  * 检测数值最大精度
300
307
  * @param {...any} numbers 待检测数值
@@ -766,6 +773,8 @@ export declare const loadScript: (src: string, forceReload?: boolean) => Promise
766
773
  */
767
774
  export declare const lockElementInteraction: (el: HTMLElement | string, payload: (reset: () => void) => void) => void;
768
775
 
776
+ export declare const markdown2Html: (md: string) => string;
777
+
769
778
  /**
770
779
  * 计算字符串的 MD5 哈希值
771
780
  * @param {string} string - 要计算 MD5 的字符串
@@ -1534,6 +1543,15 @@ export declare const stripSlashes: (str: string) => string;
1534
1543
  */
1535
1544
  export declare const strToPascalCase: (str: string, capitalize_first?: boolean) => string;
1536
1545
 
1546
+ /**
1547
+ * 将纯文本转换为 HTML(转义特殊字符并处理换行)
1548
+ * @param {string} text - 纯文本字符串
1549
+ * @returns {string} 返回 HTML 字符串
1550
+ * @example
1551
+ * text2Html('Hello\nWorld') // 'Hello<br/>World'
1552
+ */
1553
+ export declare const text2Html: (text: string) => string;
1554
+
1537
1555
  /**
1538
1556
  * 节流函数
1539
1557
  * 规定在一个单位时间内,只能触发一次函数。如果这个函数单位时间内触发多次函数,只有一次生效。