Repository navigation
Conversation
…tops at Slovenia. Added bank_identifier to SK, SM, SO, ST, SV, TL, TN, TR, UA, VA, VG, XK.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request:
extractIBAN()now returnsbankIdentifierfor SK, SM, SO, ST, SV, TL, TN, TR, UA, VA, VG and XK. For example,extractIBAN('UA213223130000026007233566001').bankIdentifierwasundefinedand is now'322313', the registry's bank identifier example for UA.script/registry.txt, SI's "Bank identifier position within the BBAN" cell is a quoted value with a line break ("1-5on line 11, the closing"on line 12).builder.rbread the file line by line, so it ignored line 12, which holds the positions of the 12 countries after SI. The same bug made the builder emitbank_identifier: '-1-4'for SI, which Fixed specs for Slovenian IBAN #452 corrected by hand.script/builder.rbnow reads the registry withCSV.read(..., col_sep: "\t"), so a quoted cell can span lines. (It also drops trailing spaces from two blank lines.)src/ibantools.ts: addedbank_identifierfor the 12 countries, converted from the registry's 1-based positions (UA1-6→0-5, SM2-6→1-5, and so on). Nothing else changes;composeIBAN, validation andgetCountrySpecifications()don't readbank_identifier.script/iban_spec.jsis the regenerated output. Besides the 12 additions, SI now shows the registry's values (bank_identifier: '0-4',account_indentifier: '4-19') instead of Fixed specs for Slovenian IBAN #452's hand edit.src/ibantools.tskeeps Fixed specs for Slovenian IBAN #452's SI values and tests.Tests: a
bankIdentifiertest for each of the 12 countries using the registry's example IBAN, and a fullextractIBAN()block for UA. For ST the registry's example IBAN has invalid check digits, so the test usesST68000100010051845310112; its bank and branch codes (0001) match the registry's examples. Without thesrcchange, 13 of the new tests fail. With it,npm run allpasses and coverage is unchanged.Tests (check
[x]one of those)ChangeLog
ChangeLogfile (if not, please do so)