ms-types 0.3.24 → 0.3.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-types",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/types/utils.d.ts CHANGED
@@ -19,6 +19,13 @@ declare namespace utils {
19
19
  * utils.random(1, 10)
20
20
  */
21
21
  function random(min: number, max: number): number;
22
+ /**
23
+ * 生成随机UUID
24
+ * @returns 随机UUID字符串
25
+ * @example
26
+ * utils.randomUUID()
27
+ */
28
+ function randomUUID(): string;
22
29
  /**
23
30
  * 将应用置入前台
24
31
  * @example
@@ -26,6 +33,15 @@ declare namespace utils {
26
33
  */
27
34
  function takeMeToFront(): boolean;
28
35
 
36
+ /**
37
+ * str转 hex 字符串
38
+ * @param source 字符串
39
+ * @returns hex字符串
40
+ * @example
41
+ * utils.hexString("hello")
42
+ */
43
+ function hexString(source: string): string;
44
+
29
45
  /**
30
46
  * 字符串转base64
31
47
  * @param source 字符串
@@ -21,12 +21,27 @@ declare namespace $工具 {
21
21
  * $工具.生成随机数(1, 10)
22
22
  */
23
23
  function 生成随机数(最小值: 数字, 最大值: 数字): 数字;
24
+ /**
25
+ * 生成随机UUID
26
+ * @returns 随机UUID字符串
27
+ * @example
28
+ * $工具.生成随机UUID()
29
+ */
30
+ function 生成随机UUID(): 字符串;
24
31
  /**
25
32
  * 将应用置入前台
26
33
  * @example
27
34
  * $工具.APP切入前台()
28
35
  */
29
36
  function APP切入前台(): 布尔值;
37
+ /**
38
+ * 字符串转hex
39
+ * @param source 字符串
40
+ * @returns hex字符串
41
+ * @example
42
+ * utils.字符串转hex("hello")
43
+ */
44
+ function 字符串转hex(source: string): string;
30
45
  /**
31
46
  * 字符串转base64
32
47
  * @param source 字符串