@lntvow/utils 1.0.11 → 1.0.13

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.
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @description 获取随机颜色
3
+ * @return {String} 随机颜色
4
+ *
5
+ * @example getRandomColor() => '#f36a38'
6
+ * */
7
+ export declare function getRandomColor(): string;
8
+ /**
9
+ * @description 获取随机字符串
10
+ * @param {Number} number 长度
11
+ * @return {String} 随机字符串
12
+ *
13
+ * @example getRandomString(20) => 'tlw491y5ha357l59980n'
14
+ * */
15
+ export declare function getRandomString(number: number): string;
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/getRandom.ts","../src/index.ts"],"sourcesContent":["/**\n * @description 获取随机颜色\n * @return {String} 随机颜色\n *\n * @example getRandomColor() => '#f36a38'\n * */\n\nexport function getRandomColor(): string {\n return `#${Math.random().toString(16).slice(2, 8).padEnd(6, '0')}`\n}\n\n/**\n * @description 获取随机字符串\n * @param {Number} number 长度\n * @return {String} 随机字符串\n *\n * @example getRandomString(20) => 'tlw491y5ha357l59980n'\n * */\n\nexport function getRandomString(number: number): string {\n return number > 10\n ? getRandomString(10) + getRandomString(number - 10)\n : Math.random()\n .toString(36)\n .slice(2, number + 2)\n}\n\nconsole.log('222222')\n","import { getRandomColor } from './getRandom'\n\nexport * from './getRandom'\n\nconsole.log(111_111)\n\n// 导出具名内容\nexport function someFunction() {\n // 函数实现\n}\n"],"names":["getRandomColor","getRandomString","number","someFunction"],"mappings":"gFAOO,SAASA,GAAyB,CACvC,MAAO,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,EAAG,CAAC,EAAE,OAAO,EAAG,GAAG,GACjE,CAUO,SAASC,EAAgBC,EAAwB,CACtD,OAAOA,EAAS,GACZD,EAAgB,EAAE,EAAIA,EAAgBC,EAAS,EAAE,EACjD,KAAK,SACF,SAAS,EAAE,EACX,MAAM,EAAGA,EAAS,CAAC,CAC5B,CAEA,QAAQ,IAAI,QAAQ,ECvBpB,QAAQ,IAAI,MAAO,EAGZ,SAASC,GAAe,CAE/B"}
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../src/getRandom.ts","../src/index.ts"],"sourcesContent":["/**\n * @description 获取随机颜色\n * @return {String} 随机颜色\n *\n * @example getRandomColor() => '#f36a38'\n * */\n\nexport function getRandomColor(): string {\n return `#${Math.random().toString(16).slice(2, 8).padEnd(6, '0')}`\n}\n\n/**\n * @description 获取随机字符串\n * @param {Number} number 长度\n * @return {String} 随机字符串\n *\n * @example getRandomString(20) => 'tlw491y5ha357l59980n'\n * */\n\nexport function getRandomString(number: number): string {\n return number > 10\n ? getRandomString(10) + getRandomString(number - 10)\n : Math.random()\n .toString(36)\n .slice(2, number + 2)\n}\n\nconsole.log('222222')\n","import { getRandomColor } from './getRandom'\n\nexport * from './getRandom'\n\nconsole.log(111_111)\n\n// 导出具名内容\nexport function someFunction() {\n // 函数实现\n}\n"],"names":["getRandomColor","getRandomString","number","someFunction"],"mappings":"AAOO,SAASA,IAAyB;AACvC,SAAO,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,CAAC,EAAE,OAAO,GAAG,GAAG;AACjE;AAUO,SAASC,EAAgBC,GAAwB;AACtD,SAAOA,IAAS,KACZD,EAAgB,EAAE,IAAIA,EAAgBC,IAAS,EAAE,IACjD,KAAK,SACF,SAAS,EAAE,EACX,MAAM,GAAGA,IAAS,CAAC;AAC5B;AAEA,QAAQ,IAAI,QAAQ;ACvBpB,QAAQ,IAAI,MAAO;AAGZ,SAASC,IAAe;AAE/B;"}
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "@lntvow/utils",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "工具库",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "lntvow",
8
8
  "files": [
9
- "dist/index.cjs.js",
10
- "dist/index.es.js",
11
- "dist/index.d.ts"
9
+ "dist"
12
10
  ],
13
11
  "main": "dist/index.cjs.js",
14
12
  "module": "dist/index.es.js",