Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: move toUpperCase comment
  • Loading branch information
ejcheng authored Sep 21, 2022
commit 337321ef5c736e1d77f27c4f62fe46fbff1ced2b
4 changes: 2 additions & 2 deletions src/lib/isBIC.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ const isBICReg = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;
export default function isBIC(str) {
assertString(str);

const countryCode = str.slice(4, 6).toUpperCase();

// toUpperCase() should be removed when a new major version goes out that changes
// the regex to [A-Z] (per the spec).
const countryCode = str.slice(4, 6).toUpperCase();

if (!CountryCodes.has(countryCode) && countryCode !== 'XK') {
return false;
}
Expand Down