diff options
| author | ST-DDT <[email protected]> | 2022-04-06 00:29:25 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-05 22:29:25 +0000 |
| commit | 46b2bd4837643b7a97b801d88134dc6b4ceeda21 (patch) | |
| tree | d2109bd1becf574e22caae17ec9afe31905b5b7c | |
| parent | c6d0cc7ae4f8ea220803bcee5a5e84a7b8230951 (diff) | |
| download | faker-46b2bd4837643b7a97b801d88134dc6b4ceeda21.tar.xz faker-46b2bd4837643b7a97b801d88134dc6b4ceeda21.zip | |
chore: fix finance.iban warnings (#781)
| -rw-r--r-- | src/iban.ts | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/iban.ts b/src/iban.ts index b608357e..2e67f281 100644 --- a/src/iban.ts +++ b/src/iban.ts @@ -30,21 +30,13 @@ export = { pattern10: ['01', '02', '03', '04', '05', '06', '07', '08', '09'], pattern100: ['001', '002', '003', '004', '005', '006', '007', '008', '009'], toDigitString: (str: string): string => - str.replace( - /[A-Z]/gi, - (match) => - // TODO @Shinigami92 2022-01-13: This needs to be converted to string - // @ts-expect-error - match.toUpperCase().charCodeAt(0) - 55 + str.replace(/[A-Z]/gi, (match) => + String(match.toUpperCase().charCodeAt(0) - 55) ), mod97: (digitStr: string): number => { let m = 0; for (let i = 0; i < digitStr.length; i++) { - m = - (m * 10 + - // @ts-expect-error: We need to convert this properly - (digitStr[i] | 0)) % - 97; + m = (m * 10 + +digitStr[i]) % 97; } return m; }, |
