Skip to content

Commit

Permalink
chore: fix finance.iban warnings (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Apr 5, 2022
1 parent c6d0cc7 commit 46b2bd4
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/iban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down

0 comments on commit 46b2bd4

Please sign in to comment.