ibantools 4.2.1 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ibantools.d.ts +1 -1
- package/build/ibantools.js +3 -3
- package/jsnext/ibantools.js +3 -3
- package/package.json +2 -2
package/build/ibantools.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface ValidateIBANResult {
|
|
|
38
38
|
* validateIBAN
|
|
39
39
|
* ```
|
|
40
40
|
* // returns {errorCodes: [], valid: true}
|
|
41
|
-
* ibantools.validateIBAN("
|
|
41
|
+
* ibantools.validateIBAN("NL91ABNA0417164300");
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
44
|
export declare function validateIBAN(iban?: string): ValidateIBANResult;
|
package/build/ibantools.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @package Documentation
|
|
9
9
|
* @author Saša Jovanić
|
|
10
10
|
* @module ibantools
|
|
11
|
-
* @version 4.2.
|
|
11
|
+
* @version 4.2.2
|
|
12
12
|
* @license MPL-2.0
|
|
13
13
|
* @preferred
|
|
14
14
|
*/
|
|
@@ -56,7 +56,7 @@ var ValidationErrorsIBAN;
|
|
|
56
56
|
* validateIBAN
|
|
57
57
|
* ```
|
|
58
58
|
* // returns {errorCodes: [], valid: true}
|
|
59
|
-
* ibantools.validateIBAN("
|
|
59
|
+
* ibantools.validateIBAN("NL91ABNA0417164300");
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
62
62
|
function validateIBAN(iban) {
|
|
@@ -85,7 +85,7 @@ function validateIBAN(iban) {
|
|
|
85
85
|
result.valid = false;
|
|
86
86
|
result.errorCodes.push(ValidationErrorsIBAN.ChecksumNotNumber);
|
|
87
87
|
}
|
|
88
|
-
if (!isValidIBANChecksum(iban)) {
|
|
88
|
+
if (result.errorCodes.indexOf(ValidationErrorsIBAN.WrongBBANFormat) !== -1 || !isValidIBANChecksum(iban)) {
|
|
89
89
|
result.valid = false;
|
|
90
90
|
result.errorCodes.push(ValidationErrorsIBAN.WrongIBANChecksum);
|
|
91
91
|
}
|
package/jsnext/ibantools.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @package Documentation
|
|
9
9
|
* @author Saša Jovanić
|
|
10
10
|
* @module ibantools
|
|
11
|
-
* @version 4.2.
|
|
11
|
+
* @version 4.2.2
|
|
12
12
|
* @license MPL-2.0
|
|
13
13
|
* @preferred
|
|
14
14
|
*/
|
|
@@ -53,7 +53,7 @@ export var ValidationErrorsIBAN;
|
|
|
53
53
|
* validateIBAN
|
|
54
54
|
* ```
|
|
55
55
|
* // returns {errorCodes: [], valid: true}
|
|
56
|
-
* ibantools.validateIBAN("
|
|
56
|
+
* ibantools.validateIBAN("NL91ABNA0417164300");
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
59
|
export function validateIBAN(iban) {
|
|
@@ -82,7 +82,7 @@ export function validateIBAN(iban) {
|
|
|
82
82
|
result.valid = false;
|
|
83
83
|
result.errorCodes.push(ValidationErrorsIBAN.ChecksumNotNumber);
|
|
84
84
|
}
|
|
85
|
-
if (!isValidIBANChecksum(iban)) {
|
|
85
|
+
if (result.errorCodes.indexOf(ValidationErrorsIBAN.WrongBBANFormat) !== -1 || !isValidIBANChecksum(iban)) {
|
|
86
86
|
result.valid = false;
|
|
87
87
|
result.errorCodes.push(ValidationErrorsIBAN.WrongIBANChecksum);
|
|
88
88
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ibantools",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.2",
|
|
4
4
|
"description": "Validation, extraction and creation of IBAN, BBAN, BIC/SWIFT numbers plus some other helpful stuff like ISO 3136-1 alpha 2 country list",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"IBAN",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@typescript-eslint/parser": "^5.0.0",
|
|
55
55
|
"chai": "^4.3.4",
|
|
56
56
|
"coveralls": "^3.1.1",
|
|
57
|
-
"docdash": "^
|
|
57
|
+
"docdash": "^2.0.0",
|
|
58
58
|
"eslint": "^8.0.0",
|
|
59
59
|
"eslint-config-prettier": "^8.3.0",
|
|
60
60
|
"eslint-plugin-prettier": "^4.0.0",
|