aboutsummaryrefslogtreecommitdiff
path: root/src/modules/finance
diff options
context:
space:
mode:
authorShinigami <[email protected]>2024-02-18 23:56:40 +0100
committerGitHub <[email protected]>2024-02-18 23:56:40 +0100
commit52b8992cbf960e001336d59b83c610845ff35860 (patch)
treec71db76f3f955a74be4cbcbaa56df77375cb4531 /src/modules/finance
parentec5609b18c79ea9fc8183ae78e917801e6a8a3f4 (diff)
downloadfaker-52b8992cbf960e001336d59b83c610845ff35860.tar.xz
faker-52b8992cbf960e001336d59b83c610845ff35860.zip
infra(unicorn): prefer-string-replace-all (#2653)
Diffstat (limited to 'src/modules/finance')
-rw-r--r--src/modules/finance/iban.ts2
-rw-r--r--src/modules/finance/index.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/finance/iban.ts b/src/modules/finance/iban.ts
index d639404c..b730d365 100644
--- a/src/modules/finance/iban.ts
+++ b/src/modules/finance/iban.ts
@@ -1407,7 +1407,7 @@ const iban: Iban = {
pattern10: ['01', '02', '03', '04', '05', '06', '07', '08', '09'],
pattern100: ['001', '002', '003', '004', '005', '006', '007', '008', '009'],
toDigitString: (str) =>
- str.replace(/[A-Z]/gi, (match) =>
+ str.replaceAll(/[A-Z]/gi, (match) =>
String((match.toUpperCase().codePointAt(0) ?? Number.NaN) - 55)
),
};
diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts
index a19595d3..4013f99f 100644
--- a/src/modules/finance/index.ts
+++ b/src/modules/finance/index.ts
@@ -850,7 +850,7 @@ export class FinanceModule extends ModuleBase {
format = this.faker.helpers.arrayElement(formats);
}
- format = format.replace(/\//g, '');
+ format = format.replaceAll('/', '');
return this.faker.helpers.replaceCreditCardSymbols(format);
}