diff options
Diffstat (limited to 'src/modules/string')
| -rw-r--r-- | src/modules/string/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/string/index.ts b/src/modules/string/index.ts index f1a13c1d..de1ec446 100644 --- a/src/modules/string/index.ts +++ b/src/modules/string/index.ts @@ -79,7 +79,7 @@ export type NumericChar = export type AlphaChar = LowerAlphaChar | UpperAlphaChar; export type AlphaNumericChar = AlphaChar | NumericChar; -const SAMPLE_MAX_LENGTH = Math.pow(2, 20); +const SAMPLE_MAX_LENGTH = 2 ** 20; /** * Module to generate string related entries. @@ -416,7 +416,7 @@ export class StringModule { while (returnString.length < length) { returnString += String.fromCharCode( - this.faker.datatype.number(charCodeOption) + this.faker.number.int(charCodeOption) ); } @@ -434,7 +434,7 @@ export class StringModule { uuid(): string { const RFC4122_TEMPLATE = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'; const replacePlaceholders = (placeholder: string) => { - const random = this.faker.datatype.number({ min: 0, max: 15 }); + const random = this.faker.number.int(15); const value = placeholder === 'x' ? random : (random & 0x3) | 0x8; return value.toString(16); }; |
