diff --git a/ChangeLog b/ChangeLog index a6c721f..5378f51 100755 --- a/ChangeLog +++ b/ChangeLog @@ -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ć * Upgraded several npm packages * Moved to new ts compiler targets diff --git a/src/ibantools.ts b/src/ibantools.ts index 6b964fb..e83cde7 100755 --- a/src/ibantools.ts +++ b/src/ibantools.ts @@ -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', @@ -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, @@ -1316,7 +1317,7 @@ export const countrySpecs: CountryMapInternal = { branch_indentifier: '3-5', bank_identifier: '0-2', }, - IM: {}, + IM: { SEPA: true }, IN: {}, IO: {}, IQ: { @@ -1348,7 +1349,7 @@ export const countrySpecs: CountryMapInternal = { bank_identifier: '1-5', account_indentifier: '4-27', }, - JE: {}, + JE: { SEPA: true }, JM: {}, JO: { chars: 30, @@ -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', }, @@ -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', }, @@ -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: { @@ -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: { @@ -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', }, diff --git a/test/ibantools_test.js b/test/ibantools_test.js index d03d095..2f1cf8f 100644 --- a/test/ibantools_test.js +++ b/test/ibantools_test.js @@ -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() {