@bearei/server-common 0.0.98 → 0.0.100

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.
@@ -1 +1 @@
1
- export declare const generateRandomNumber: (length: number) => number;
1
+ export declare const generateRandomNumberString: (length: number) => string;
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateRandomNumber = void 0;
4
- const generateRandomNumber = (length) => {
5
- const min = Math.pow(10, length - 1);
6
- const max = Math.pow(10, length) - 1;
7
- return Math.floor(Math.random() * (max - min + 1)) + min;
8
- };
9
- exports.generateRandomNumber = generateRandomNumber;
3
+ exports.generateRandomNumberString = void 0;
4
+ const generateRandomNumberString = (length) => Array.from({ length }, () => Math.floor(Math.random() * 10)).join('');
5
+ exports.generateRandomNumberString = generateRandomNumberString;
10
6
  //# sourceMappingURL=generate-random-number.util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-random-number.util.js","sourceRoot":"","sources":["../../src/util/generate-random-number.util.ts"],"names":[],"mappings":";;;AAAO,MAAM,oBAAoB,GAAG,CAAC,MAAc,EAAE,EAAE;IACnD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC,CAAA;IACpC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA;IAEpC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAA;AAC5D,CAAC,CAAA;AALY,QAAA,oBAAoB,wBAKhC"}
1
+ {"version":3,"file":"generate-random-number.util.js","sourceRoot":"","sources":["../../src/util/generate-random-number.util.ts"],"names":[],"mappings":";;;AAAO,MAAM,0BAA0B,GAAG,CAAC,MAAc,EAAE,EAAE,CACzD,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAD1D,QAAA,0BAA0B,8BACgC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bearei/server-common",
3
- "version": "0.0.98",
3
+ "version": "0.0.100",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "bearei <bear_ei@outlook.com>",