From 52b8992cbf960e001336d59b83c610845ff35860 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Sun, 18 Feb 2024 23:56:40 +0100 Subject: infra(unicorn): prefer-string-replace-all (#2653) --- src/modules/string/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/string') 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 })); } /** -- cgit v1.2.3