Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2026-03-25 Pablo
* Added AL, ME, MK, MD, RS, GG, JE, IM, XK to SEPA countries

2024-04-13 Saša Jovanić <sasa@simplify.ba>
* Upgraded several npm packages
* Moved to new ts compiler targets
Expand Down
12 changes: 9 additions & 3 deletions src/ibantools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@ export const countrySpecs: CountryMapInternal = {
chars: 28,
bban_regexp: '^[0-9]{8}[A-Z0-9]{16}$',
IBANRegistry: true,
SEPA: true,
branch_indentifier: '3-7',
bank_identifier: '0-2',
account_indentifier: '12-28',
Expand Down Expand Up @@ -1225,7 +1226,7 @@ export const countrySpecs: CountryMapInternal = {
bban_regexp: '^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$',
IBANRegistry: true,
},
GG: {},
GG: { SEPA: true },
GH: {},
GI: {
chars: 23,
Expand Down Expand Up @@ -1316,7 +1317,7 @@ export const countrySpecs: CountryMapInternal = {
branch_indentifier: '3-5',
bank_identifier: '0-2',
},
IM: {},
IM: { SEPA: true },
IN: {},
IO: {},
IQ: {
Expand Down Expand Up @@ -1348,7 +1349,7 @@ export const countrySpecs: CountryMapInternal = {
bank_identifier: '1-5',
account_indentifier: '4-27',
},
JE: {},
JE: { SEPA: true },
JM: {},
JO: {
chars: 30,
Expand Down Expand Up @@ -1450,6 +1451,7 @@ export const countrySpecs: CountryMapInternal = {
chars: 24,
bban_regexp: '^[A-Z0-9]{2}[A-Z0-9]{18}$',
IBANRegistry: true,
SEPA: true,
bank_identifier: '0-1',
account_indentifier: '6-24',
},
Expand All @@ -1458,6 +1460,7 @@ export const countrySpecs: CountryMapInternal = {
bban_regexp: '^[0-9]{18}$',
bban_validation_func: checkMod9710BBAN,
IBANRegistry: true,
SEPA: true,
bank_identifier: '0-2',
account_indentifier: '4-22',
},
Expand All @@ -1476,6 +1479,7 @@ export const countrySpecs: CountryMapInternal = {
bban_regexp: '^[0-9]{3}[A-Z0-9]{10}[0-9]{2}$',
bban_validation_func: checkMod9710BBAN,
IBANRegistry: true,
SEPA: true,
bank_identifier: '0-2',
},
ML: {
Expand Down Expand Up @@ -1651,6 +1655,7 @@ export const countrySpecs: CountryMapInternal = {
bban_regexp: '^[0-9]{18}$',
bban_validation_func: checkMod9710BBAN,
IBANRegistry: true,
SEPA: true,
bank_identifier: '0-2',
},
RU: {
Expand Down Expand Up @@ -1822,6 +1827,7 @@ export const countrySpecs: CountryMapInternal = {
chars: 20,
bban_regexp: '^[0-9]{16}$',
IBANRegistry: true,
SEPA: true,
branch_indentifier: '2-3',
account_indentifier: '4-20',
},
Expand Down
5 changes: 5 additions & 0 deletions test/ibantools_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,11 @@ describe('IBANTools', function() {
it('with non valid country code XX return false', function() {
expect(iban.isSEPACountry('XX')).to.be.false;
});
['AL', 'ME', 'MK', 'MD', 'RS', 'GG', 'JE', 'IM', 'XK'].forEach(country => {
it(`with valid country code ${country} should return true`, function() {
expect(iban.isSEPACountry(country)).to.be.true;
});
});
});

describe('When calling extractBIC() with valid BIC ABNANL2A', function() {
Expand Down