minutool 1.0.6 → 1.0.8
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 -2
- package/dist/minutool.js +308 -300
- package/dist/minutool.js.map +1 -1
- package/dist/minutool.umd.cjs +4 -4
- package/dist/minutool.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -286,11 +286,21 @@ export declare function deepClone<T>(obj: T): T;
|
|
|
286
286
|
/**
|
|
287
287
|
* 删除 Cookie
|
|
288
288
|
* @param {string} name - Cookie 名称
|
|
289
|
+
* @param {string} [path='/'] - Cookie 路径,必须与设置时的路径一致
|
|
290
|
+
* @param {string} [domain] - Cookie 域名,必须与设置时的域名一致
|
|
289
291
|
* @returns {void}
|
|
290
292
|
* @example
|
|
291
293
|
* deleteCookie('username')
|
|
294
|
+
* deleteCookie('username', '/', '.example.com')
|
|
292
295
|
*/
|
|
293
|
-
export declare const deleteCookie: (name: string) => void;
|
|
296
|
+
export declare const deleteCookie: (name: string, path?: string, domain?: string) => void;
|
|
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;
|
|
294
304
|
|
|
295
305
|
/**
|
|
296
306
|
* 检测数值最大精度
|
|
@@ -1449,11 +1459,13 @@ export declare const SELF_CLOSING_TAGS: string[];
|
|
|
1449
1459
|
* @param {string} value - Cookie 值
|
|
1450
1460
|
* @param {number} days - 有效天数,0 表示会话 Cookie
|
|
1451
1461
|
* @param {string} [path='/'] - Cookie 路径,默认为根路径
|
|
1462
|
+
* @param {string} [domain] - Cookie 域名
|
|
1452
1463
|
* @returns {void}
|
|
1453
1464
|
* @example
|
|
1454
1465
|
* setCookie('username', 'john', 7)
|
|
1466
|
+
* setCookie('username', 'john', 7, '/', '.example.com')
|
|
1455
1467
|
*/
|
|
1456
|
-
export declare const setCookie: (name: string, value: string, days: number, path?: string) => void;
|
|
1468
|
+
export declare const setCookie: (name: string, value: string, days: number, path?: string, domain?: string) => void;
|
|
1457
1469
|
|
|
1458
1470
|
/**
|
|
1459
1471
|
* 显示节点(通过设置 display 为空方式)
|