@base-web-kits/base-tools-ts 1.0.2 → 1.1.0

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.
@@ -11,10 +11,10 @@ export declare function createUUID(): string;
11
11
  * @param prefix 前缀, 默认 'id_'
12
12
  * @returns 随机字符串
13
13
  * @example
14
- * const id = createRandId(); // 'id_0rjuuuqv60xi'
15
- * const id = createRandId('canvas_'); // 'canvas_v82a7ctm09q'
14
+ * const id = createViewRandId(); // 'id_0rjuuuqv60xi'
15
+ * const id = createViewRandId('canvas_'); // 'canvas_v82a7ctm09q'
16
16
  */
17
- export declare function createRandId(prefix?: string): string;
17
+ export declare function createViewRandId(prefix?: string): string;
18
18
  /**
19
19
  * 时间+固定位数的随机数字字符串
20
20
  * @param digits 随机部分的位数,默认 6
@@ -1 +1 @@
1
- {"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src/ts/string/random.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,UAAU,WAMzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,SAAQ,UAE1C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,GAAE,MAAU,UAMlD"}
1
+ {"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src/ts/string/random.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,UAAU,WAMzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,SAAQ,UAE9C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,GAAE,MAAU,UAMlD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-web-kits/base-tools-ts",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "sideEffects": false,
5
5
  "description": "Independent TS utilities package built from src/ts.",
6
6
  "keywords": [
@@ -18,10 +18,10 @@ export function createUUID() {
18
18
  * @param prefix 前缀, 默认 'id_'
19
19
  * @returns 随机字符串
20
20
  * @example
21
- * const id = createRandId(); // 'id_0rjuuuqv60xi'
22
- * const id = createRandId('canvas_'); // 'canvas_v82a7ctm09q'
21
+ * const id = createViewRandId(); // 'id_0rjuuuqv60xi'
22
+ * const id = createViewRandId('canvas_'); // 'canvas_v82a7ctm09q'
23
23
  */
24
- export function createRandId(prefix = 'id_') {
24
+ export function createViewRandId(prefix = 'id_') {
25
25
  return `${prefix}${Math.random().toString(36).substring(2, 16)}`;
26
26
  }
27
27