@lntvow/utils 1.0.11 → 1.0.12

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.cjs.js CHANGED
@@ -1,37 +1,2 @@
1
- 'use strict';
2
-
3
- /**
4
- * @description 获取随机颜色
5
- * @return {String} 随机颜色
6
- *
7
- * @example getRandomColor() => '#f36a38'
8
- * */
9
- function getRandomColor() {
10
- return `#${Math.random().toString(16).slice(2, 8).padEnd(6, '0')}`;
11
- }
12
- /**
13
- * @description 获取随机字符串
14
- * @param {Number} number 长度
15
- * @return {String} 随机字符串
16
- *
17
- * @example getRandomString(20) => 'tlw491y5ha357l59980n'
18
- * */
19
- function getRandomString(number) {
20
- return number > 10
21
- ? getRandomString(10) + getRandomString(number - 10)
22
- : Math.random()
23
- .toString(36)
24
- .slice(2, number + 2);
25
- }
26
- console.log('222222');
27
-
28
- console.log(111_111);
29
- // 导出具名内容
30
- function someFunction() {
31
- // 函数实现
32
- }
33
-
34
- exports.getRandomColor = getRandomColor;
35
- exports.getRandomString = getRandomString;
36
- exports.someFunction = someFunction;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}function n(o){return o>10?n(10)+n(o-10):Math.random().toString(36).slice(2,o+2)}console.log("222222");console.log(111111);function e(){}exports.getRandomColor=t;exports.getRandomString=n;exports.someFunction=e;
37
2
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.d.ts CHANGED
@@ -1,19 +1,2 @@
1
- /**
2
- * @description 获取随机颜色
3
- * @return {String} 随机颜色
4
- *
5
- * @example getRandomColor() => '#f36a38'
6
- * */
7
- declare function getRandomColor(): string;
8
- /**
9
- * @description 获取随机字符串
10
- * @param {Number} number 长度
11
- * @return {String} 随机字符串
12
- *
13
- * @example getRandomString(20) => 'tlw491y5ha357l59980n'
14
- * */
15
- declare function getRandomString(number: number): string;
16
-
17
- declare function someFunction(): void;
18
-
19
- export { getRandomColor, getRandomString, someFunction };
1
+ export * from './getRandom';
2
+ export declare function someFunction(): void;
package/dist/index.es.js CHANGED
@@ -1,33 +1,16 @@
1
- /**
2
- * @description 获取随机颜色
3
- * @return {String} 随机颜色
4
- *
5
- * @example getRandomColor() => '#f36a38'
6
- * */
7
- function getRandomColor() {
8
- return `#${Math.random().toString(16).slice(2, 8).padEnd(6, '0')}`;
1
+ function t() {
2
+ return `#${Math.random().toString(16).slice(2, 8).padEnd(6, "0")}`;
9
3
  }
10
- /**
11
- * @description 获取随机字符串
12
- * @param {Number} number 长度
13
- * @return {String} 随机字符串
14
- *
15
- * @example getRandomString(20) => 'tlw491y5ha357l59980n'
16
- * */
17
- function getRandomString(number) {
18
- return number > 10
19
- ? getRandomString(10) + getRandomString(number - 10)
20
- : Math.random()
21
- .toString(36)
22
- .slice(2, number + 2);
4
+ function n(o) {
5
+ return o > 10 ? n(10) + n(o - 10) : Math.random().toString(36).slice(2, o + 2);
23
6
  }
24
- console.log('222222');
25
-
26
- console.log(111_111);
27
- // 导出具名内容
28
- function someFunction() {
29
- // 函数实现
7
+ console.log("222222");
8
+ console.log(111111);
9
+ function i() {
30
10
  }
31
-
32
- export { getRandomColor, getRandomString, someFunction };
11
+ export {
12
+ t as getRandomColor,
13
+ n as getRandomString,
14
+ i as someFunction
15
+ };
33
16
  //# sourceMappingURL=index.es.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/utils",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "工具库",
5
5
  "type": "module",
6
6
  "license": "MIT",