Skip to content

Commit

Permalink
Version 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Simplify committed Nov 25, 2021
1 parent 6442a82 commit d69c228
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 51 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
2021-11-25 Saša Jovanić <sasa@simplify.ba>
* Version 4.1.0
* Added Belgian (BE) extra BBAN validation
* Added mod97/10 BBAN validation for countries that do it that way: BA, ME, MK, PT, RS, SI
* Added mod97/10 BBAN validation for countries that do it that way: BA, ME, MK, PT, RS and SI

2021-11-24 Saša Jovanić <sasa@simplify.ba>
* Added Netherlands (NL) extra BBAN validation
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@
![No deps](https://img.shields.io/badge/dependencies-0-brightgreen)
![dev deps](https://img.shields.io/librariesio/github/Simplify/IBANTools?label=devDependencies)

## About

IBANTools is TypeScript/JavaScript library for validation, creation and extraction of IBAN, BBAN and BIC/SWIFT numbers.

For more information about IBAN/BBAN see [wikipedia page](https://en.wikipedia.org/wiki/International_Bank_Account_Number) and
[IBAN registry](https://www.swift.com/resource/iban-registry-pdf).

For more information about BIC/SWIFT see [this wikipedia page](https://en.wikipedia.org/wiki/ISO_9362).

## Installation and usage
## Installation

### Node (Common JS ES5 and ES6)

Expand Down
8 changes: 7 additions & 1 deletion dist/ibantools.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ define(["require", "exports"], function (require, exports) {
return reminder === checksum;
};
/**
* Used for Belgian BBAN check
* Mod 97/10 calculation
*
* @ignore
*/
Expand All @@ -492,6 +492,12 @@ define(["require", "exports"], function (require, exports) {
}
return parseInt(validationString, 10) % 97;
};
/**
* Check BBAN based on Mod97/10 calculation for countries that support it:
* BA, ME, MK, PT, RS, SI
*
* @ignore
*/
var checkMod9710BBAN = function (bban) {
var stripped = bban.replace(/[\s.]+/g, '');
var reminder = mod9710(stripped);
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/enums/ValidationErrorsBIC.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h3>NoBICCountry</h3>
<div class="tsd-signature tsd-kind-icon">NoBICCountry<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 1</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L400">IBANTools.ts:400</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L401">IBANTools.ts:401</a></li>
</ul>
</aside>
</section>
Expand All @@ -105,7 +105,7 @@ <h3>NoBICProvided</h3>
<div class="tsd-signature tsd-kind-icon">NoBICProvided<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 0</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L399">IBANTools.ts:399</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L400">IBANTools.ts:400</a></li>
</ul>
</aside>
</section>
Expand All @@ -115,7 +115,7 @@ <h3>WrongBICFormat</h3>
<div class="tsd-signature tsd-kind-icon">WrongBICFormat<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 2</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L401">IBANTools.ts:401</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L402">IBANTools.ts:402</a></li>
</ul>
</aside>
</section>
Expand Down
26 changes: 20 additions & 6 deletions docs/enums/ValidationErrorsIBAN.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ <h3>Enumeration members</h3>
<li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="ValidationErrorsIBAN.html#ChecksumNotNumber" class="tsd-kind-icon">Checksum<wbr>Not<wbr>Number</a></li>
<li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="ValidationErrorsIBAN.html#NoIBANCountry" class="tsd-kind-icon">NoIBANCountry</a></li>
<li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="ValidationErrorsIBAN.html#NoIBANProvided" class="tsd-kind-icon">NoIBANProvided</a></li>
<li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="ValidationErrorsIBAN.html#WrongAccountBankBranchChecksum" class="tsd-kind-icon">Wrong<wbr>Account<wbr>Bank<wbr>Branch<wbr>Checksum</a></li>
<li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="ValidationErrorsIBAN.html#WrongBBANFormat" class="tsd-kind-icon">WrongBBANFormat</a></li>
<li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="ValidationErrorsIBAN.html#WrongBBANLength" class="tsd-kind-icon">WrongBBANLength</a></li>
<li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="ValidationErrorsIBAN.html#WrongIBANChecksum" class="tsd-kind-icon">WrongIBANChecksum</a></li>
Expand All @@ -98,7 +99,7 @@ <h3>Checksum<wbr>Not<wbr>Number</h3>
<div class="tsd-signature tsd-kind-icon">Checksum<wbr>Not<wbr>Number<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 4</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L57">IBANTools.ts:57</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L57">IBANTools.ts:57</a></li>
</ul>
</aside>
</section>
Expand All @@ -108,7 +109,7 @@ <h3>NoIBANCountry</h3>
<div class="tsd-signature tsd-kind-icon">NoIBANCountry<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 1</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L54">IBANTools.ts:54</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L54">IBANTools.ts:54</a></li>
</ul>
</aside>
</section>
Expand All @@ -118,7 +119,17 @@ <h3>NoIBANProvided</h3>
<div class="tsd-signature tsd-kind-icon">NoIBANProvided<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 0</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L53">IBANTools.ts:53</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L53">IBANTools.ts:53</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum">
<a name="WrongAccountBankBranchChecksum" class="tsd-anchor"></a>
<h3>Wrong<wbr>Account<wbr>Bank<wbr>Branch<wbr>Checksum</h3>
<div class="tsd-signature tsd-kind-icon">Wrong<wbr>Account<wbr>Bank<wbr>Branch<wbr>Checksum<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 6</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L59">IBANTools.ts:59</a></li>
</ul>
</aside>
</section>
Expand All @@ -128,7 +139,7 @@ <h3>WrongBBANFormat</h3>
<div class="tsd-signature tsd-kind-icon">WrongBBANFormat<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 3</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L56">IBANTools.ts:56</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L56">IBANTools.ts:56</a></li>
</ul>
</aside>
</section>
Expand All @@ -138,7 +149,7 @@ <h3>WrongBBANLength</h3>
<div class="tsd-signature tsd-kind-icon">WrongBBANLength<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 2</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L55">IBANTools.ts:55</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L55">IBANTools.ts:55</a></li>
</ul>
</aside>
</section>
Expand All @@ -148,7 +159,7 @@ <h3>WrongIBANChecksum</h3>
<div class="tsd-signature tsd-kind-icon">WrongIBANChecksum<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = 5</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L58">IBANTools.ts:58</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L58">IBANTools.ts:58</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -181,6 +192,9 @@ <h3>WrongIBANChecksum</h3>
<li class=" tsd-kind-enum-member tsd-parent-kind-enum">
<a href="ValidationErrorsIBAN.html#NoIBANProvided" class="tsd-kind-icon">NoIBANProvided</a>
</li>
<li class=" tsd-kind-enum-member tsd-parent-kind-enum">
<a href="ValidationErrorsIBAN.html#WrongAccountBankBranchChecksum" class="tsd-kind-icon">Wrong<wbr>Account<wbr>Bank<wbr>Branch<wbr>Checksum</a>
</li>
<li class=" tsd-kind-enum-member tsd-parent-kind-enum">
<a href="ValidationErrorsIBAN.html#WrongBBANFormat" class="tsd-kind-icon">WrongBBANFormat</a>
</li>
Expand Down
11 changes: 7 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ <h1>IBANTools</h1>
<a href="#ibantools" id="ibantools" style="color: inherit; text-decoration: none;">
<h1>IBANTools</h1>
</a>
<p><a href="https://img.shields.io/github/license/Simplify/ibantools"><img src="https://github.com/Simplify/ibantools/blob/master/LICENSE" alt="License"></a></p>
<p><a href="https://github.com/Simplify/ibantools/blob/master/LICENSE"><img src="https://img.shields.io/github/license/Simplify/ibantools" alt="License"></a></p>
<p><a href="https://badge.fury.io/bo/ibantools"><img src="https://badge.fury.io/bo/ibantools.svg" alt="Bower version"></a>
<a href="https://badge.fury.io/js/ibantools"><img src="https://badge.fury.io/js/ibantools.svg" alt="npm version"></a>
<a href="https://img.shields.io/npm/dw/ibantools"><img src="https://www.npmjs.com/package/ibantools" alt="NPM downloads"></a>
<a href="https://www.npmjs.com/package/ibantools"><img src="https://img.shields.io/npm/dw/ibantools" alt="NPM downloads"></a>
<img src="https://img.shields.io/librariesio/dependents/npm/ibantools" alt="Dependents (via libraries.io)"></p>
<p><img src="https://github.com/Simplify/ibantools/workflows/Build%20CI%20(Master)/badge.svg?branch=master" alt="Build CI">
<img src="https://github.com/Simplify/ibantools/workflows/ESLint%20&%20Prettier/badge.svg?branch=master" alt="ESLint &amp; Prettier CI">
Expand All @@ -77,12 +77,15 @@ <h1>IBANTools</h1>
<img src="https://img.shields.io/github/issues-pr-closed/Simplify/IBANTools" alt="GitHub closed pull requests"></p>
<p><img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="No deps">
<img src="https://img.shields.io/librariesio/github/Simplify/IBANTools?label=devDependencies" alt="dev deps"></p>
<a href="#about" id="about" style="color: inherit; text-decoration: none;">
<h2>About</h2>
</a>
<p>IBANTools is TypeScript/JavaScript library for validation, creation and extraction of IBAN, BBAN and BIC/SWIFT numbers.</p>
<p>For more information about IBAN/BBAN see <a href="https://en.wikipedia.org/wiki/International_Bank_Account_Number">wikipedia page</a> and
<a href="https://www.swift.com/resource/iban-registry-pdf">IBAN registry</a>.</p>
<p>For more information about BIC/SWIFT see <a href="https://en.wikipedia.org/wiki/ISO_9362">this wikipedia page</a>.</p>
<a href="#installation-and-usage" id="installation-and-usage" style="color: inherit; text-decoration: none;">
<h2>Installation and usage</h2>
<a href="#installation" id="installation" style="color: inherit; text-decoration: none;">
<h2>Installation</h2>
</a>
<a href="#node-common-js-es5-and-es6" id="node-common-js-es5-and-es6" style="color: inherit; text-decoration: none;">
<h3>Node (Common JS ES5 and ES6)</h3>
Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/ComposeIBANParams.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> bban</h3>
<div class="tsd-signature tsd-kind-icon">bban<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L168">IBANTools.ts:168</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L173">IBANTools.ts:173</a></li>
</ul>
</aside>
</section>
Expand All @@ -112,7 +112,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> country<wbr>Code</h3>
<div class="tsd-signature tsd-kind-icon">country<wbr>Code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L167">IBANTools.ts:167</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L172">IBANTools.ts:172</a></li>
</ul>
</aside>
</section>
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/CountrySpec.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3>IBANRegistry</h3>
<div class="tsd-signature tsd-kind-icon">IBANRegistry<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L481">IBANTools.ts:481</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L482">IBANTools.ts:482</a></li>
</ul>
</aside>
</section>
Expand All @@ -114,7 +114,7 @@ <h3>SEPA</h3>
<div class="tsd-signature tsd-kind-icon">SEPA<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L482">IBANTools.ts:482</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L483">IBANTools.ts:483</a></li>
</ul>
</aside>
</section>
Expand All @@ -124,7 +124,7 @@ <h3>bban_<wbr>regexp</h3>
<div class="tsd-signature tsd-kind-icon">bban_<wbr>regexp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L480">IBANTools.ts:480</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L481">IBANTools.ts:481</a></li>
</ul>
</aside>
</section>
Expand All @@ -134,7 +134,7 @@ <h3>chars</h3>
<div class="tsd-signature tsd-kind-icon">chars<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L479">IBANTools.ts:479</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L480">IBANTools.ts:480</a></li>
</ul>
</aside>
</section>
Expand Down
12 changes: 6 additions & 6 deletions docs/interfaces/ExtractBICResult.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> bank<wbr>Code</h3>
<div class="tsd-signature tsd-kind-icon">bank<wbr>Code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L444">IBANTools.ts:444</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L445">IBANTools.ts:445</a></li>
</ul>
</aside>
</section>
Expand All @@ -116,7 +116,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> branch<wbr>Code</h3>
<div class="tsd-signature tsd-kind-icon">branch<wbr>Code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L447">IBANTools.ts:447</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L448">IBANTools.ts:448</a></li>
</ul>
</aside>
</section>
Expand All @@ -126,7 +126,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> country<wbr>Code</h3>
<div class="tsd-signature tsd-kind-icon">country<wbr>Code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L445">IBANTools.ts:445</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L446">IBANTools.ts:446</a></li>
</ul>
</aside>
</section>
Expand All @@ -136,7 +136,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> location<wbr>Code</h3
<div class="tsd-signature tsd-kind-icon">location<wbr>Code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L446">IBANTools.ts:446</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L447">IBANTools.ts:447</a></li>
</ul>
</aside>
</section>
Expand All @@ -146,7 +146,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> testBIC</h3>
<div class="tsd-signature tsd-kind-icon">testBIC<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L448">IBANTools.ts:448</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L449">IBANTools.ts:449</a></li>
</ul>
</aside>
</section>
Expand All @@ -156,7 +156,7 @@ <h3>valid</h3>
<div class="tsd-signature tsd-kind-icon">valid<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/e53954d/src/IBANTools.ts#L449">IBANTools.ts:449</a></li>
<li>Defined in <a href="https://github.com/Simplify/ibantools/blob/6442a82/src/IBANTools.ts#L450">IBANTools.ts:450</a></li>
</ul>
</aside>
</section>
Expand Down
Loading

0 comments on commit d69c228

Please sign in to comment.