diff options
| author | Shinigami <[email protected]> | 2024-02-18 23:56:40 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-18 23:56:40 +0100 |
| commit | 52b8992cbf960e001336d59b83c610845ff35860 (patch) | |
| tree | c71db76f3f955a74be4cbcbaa56df77375cb4531 /src/modules/string/index.ts | |
| parent | ec5609b18c79ea9fc8183ae78e917801e6a8a3f4 (diff) | |
| download | faker-52b8992cbf960e001336d59b83c610845ff35860.tar.xz faker-52b8992cbf960e001336d59b83c610845ff35860.zip | |
infra(unicorn): prefer-string-replace-all (#2653)
Diffstat (limited to 'src/modules/string/index.ts')
| -rw-r--r-- | src/modules/string/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/string/index.ts b/src/modules/string/index.ts index 6428153d..8b3cbd26 100644 --- a/src/modules/string/index.ts +++ b/src/modules/string/index.ts @@ -692,8 +692,8 @@ export class StringModule extends SimpleModuleBase { */ uuid(): string { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' - .replace(/x/g, () => this.faker.number.hex({ min: 0x0, max: 0xf })) - .replace(/y/g, () => this.faker.number.hex({ min: 0x8, max: 0xb })); + .replaceAll('x', () => this.faker.number.hex({ min: 0x0, max: 0xf })) + .replaceAll('y', () => this.faker.number.hex({ min: 0x8, max: 0xb })); } /** |
