ibantools 4.3.3 → 4.3.4
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 +12 -9
- package/jsnext/ibantools.js +10 -7
- package/package.json +3 -3
package/build/ibantools.d.ts
CHANGED
|
@@ -238,7 +238,7 @@ export interface ExtractBICResult {
|
|
|
238
238
|
/**
|
|
239
239
|
* extractBIC
|
|
240
240
|
* ```
|
|
241
|
-
* // returns {bankCode: "ABNA", countryCode: "NL", locationCode: "2A", branchCode: null, testBIC:
|
|
241
|
+
* // returns {bankCode: "ABNA", countryCode: "NL", locationCode: "2A", branchCode: null, testBIC: false, valid: true}
|
|
242
242
|
* ibantools.extractBIC("ABNANL2A");
|
|
243
243
|
* ```
|
|
244
244
|
*/
|
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.3.
|
|
11
|
+
* @version 4.3.4
|
|
12
12
|
* @license MPL-2.0
|
|
13
13
|
* @preferred
|
|
14
14
|
*/
|
|
@@ -63,7 +63,7 @@ var ValidationErrorsIBAN;
|
|
|
63
63
|
ValidationErrorsIBAN[ValidationErrorsIBAN["WrongIBANChecksum"] = 5] = "WrongIBANChecksum";
|
|
64
64
|
ValidationErrorsIBAN[ValidationErrorsIBAN["WrongAccountBankBranchChecksum"] = 6] = "WrongAccountBankBranchChecksum";
|
|
65
65
|
ValidationErrorsIBAN[ValidationErrorsIBAN["QRIBANNotAllowed"] = 7] = "QRIBANNotAllowed";
|
|
66
|
-
})(ValidationErrorsIBAN
|
|
66
|
+
})(ValidationErrorsIBAN || (exports.ValidationErrorsIBAN = ValidationErrorsIBAN = {}));
|
|
67
67
|
/**
|
|
68
68
|
* validateIBAN
|
|
69
69
|
* ```
|
|
@@ -354,7 +354,7 @@ function replaceCharaterWithCode(str) {
|
|
|
354
354
|
* @ignore
|
|
355
355
|
*/
|
|
356
356
|
function mod9710Iban(iban) {
|
|
357
|
-
return mod9710(replaceCharaterWithCode(iban.slice(
|
|
357
|
+
return mod9710(replaceCharaterWithCode(iban.slice(4) + iban.slice(0, 4)));
|
|
358
358
|
}
|
|
359
359
|
/**
|
|
360
360
|
* Returns specifications for all countries, even those who are not
|
|
@@ -426,7 +426,7 @@ var ValidationErrorsBIC;
|
|
|
426
426
|
ValidationErrorsBIC[ValidationErrorsBIC["NoBICProvided"] = 0] = "NoBICProvided";
|
|
427
427
|
ValidationErrorsBIC[ValidationErrorsBIC["NoBICCountry"] = 1] = "NoBICCountry";
|
|
428
428
|
ValidationErrorsBIC[ValidationErrorsBIC["WrongBICFormat"] = 2] = "WrongBICFormat";
|
|
429
|
-
})(ValidationErrorsBIC
|
|
429
|
+
})(ValidationErrorsBIC || (exports.ValidationErrorsBIC = ValidationErrorsBIC = {}));
|
|
430
430
|
/**
|
|
431
431
|
* validateBIC
|
|
432
432
|
* ```
|
|
@@ -460,7 +460,7 @@ exports.validateBIC = validateBIC;
|
|
|
460
460
|
/**
|
|
461
461
|
* extractBIC
|
|
462
462
|
* ```
|
|
463
|
-
* // returns {bankCode: "ABNA", countryCode: "NL", locationCode: "2A", branchCode: null, testBIC:
|
|
463
|
+
* // returns {bankCode: "ABNA", countryCode: "NL", locationCode: "2A", branchCode: null, testBIC: false, valid: true}
|
|
464
464
|
* ibantools.extractBIC("ABNANL2A");
|
|
465
465
|
* ```
|
|
466
466
|
*/
|
|
@@ -964,7 +964,10 @@ exports.countrySpecs = {
|
|
|
964
964
|
SEPA: true,
|
|
965
965
|
},
|
|
966
966
|
FJ: {},
|
|
967
|
-
FK: {
|
|
967
|
+
FK: {
|
|
968
|
+
chars: 18,
|
|
969
|
+
bban_regexp: '^[A-Z]{2}[0-9]{12}$',
|
|
970
|
+
},
|
|
968
971
|
FM: {},
|
|
969
972
|
FO: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true },
|
|
970
973
|
FR: {
|
|
@@ -1245,8 +1248,8 @@ exports.countrySpecs = {
|
|
|
1245
1248
|
NF: {},
|
|
1246
1249
|
NG: {},
|
|
1247
1250
|
NI: {
|
|
1248
|
-
chars:
|
|
1249
|
-
bban_regexp: '^[A-Z]{4}[0-9]{
|
|
1251
|
+
chars: 28,
|
|
1252
|
+
bban_regexp: '^[A-Z]{4}[0-9]{20}$',
|
|
1250
1253
|
},
|
|
1251
1254
|
NL: {
|
|
1252
1255
|
chars: 18,
|
|
@@ -1437,7 +1440,7 @@ exports.countrySpecs = {
|
|
|
1437
1440
|
US: {},
|
|
1438
1441
|
UY: {},
|
|
1439
1442
|
UZ: {},
|
|
1440
|
-
VA: { chars: 22, bban_regexp: '^[0-9]{18}', IBANRegistry: true },
|
|
1443
|
+
VA: { chars: 22, bban_regexp: '^[0-9]{18}', IBANRegistry: true, SEPA: true },
|
|
1441
1444
|
VC: {},
|
|
1442
1445
|
VE: {},
|
|
1443
1446
|
VG: {
|
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.3.
|
|
11
|
+
* @version 4.3.4
|
|
12
12
|
* @license MPL-2.0
|
|
13
13
|
* @preferred
|
|
14
14
|
*/
|
|
@@ -343,7 +343,7 @@ function replaceCharaterWithCode(str) {
|
|
|
343
343
|
* @ignore
|
|
344
344
|
*/
|
|
345
345
|
function mod9710Iban(iban) {
|
|
346
|
-
return mod9710(replaceCharaterWithCode(iban.slice(
|
|
346
|
+
return mod9710(replaceCharaterWithCode(iban.slice(4) + iban.slice(0, 4)));
|
|
347
347
|
}
|
|
348
348
|
/**
|
|
349
349
|
* Returns specifications for all countries, even those who are not
|
|
@@ -446,7 +446,7 @@ export function validateBIC(bic) {
|
|
|
446
446
|
/**
|
|
447
447
|
* extractBIC
|
|
448
448
|
* ```
|
|
449
|
-
* // returns {bankCode: "ABNA", countryCode: "NL", locationCode: "2A", branchCode: null, testBIC:
|
|
449
|
+
* // returns {bankCode: "ABNA", countryCode: "NL", locationCode: "2A", branchCode: null, testBIC: false, valid: true}
|
|
450
450
|
* ibantools.extractBIC("ABNANL2A");
|
|
451
451
|
* ```
|
|
452
452
|
*/
|
|
@@ -948,7 +948,10 @@ export var countrySpecs = {
|
|
|
948
948
|
SEPA: true,
|
|
949
949
|
},
|
|
950
950
|
FJ: {},
|
|
951
|
-
FK: {
|
|
951
|
+
FK: {
|
|
952
|
+
chars: 18,
|
|
953
|
+
bban_regexp: '^[A-Z]{2}[0-9]{12}$',
|
|
954
|
+
},
|
|
952
955
|
FM: {},
|
|
953
956
|
FO: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true },
|
|
954
957
|
FR: {
|
|
@@ -1229,8 +1232,8 @@ export var countrySpecs = {
|
|
|
1229
1232
|
NF: {},
|
|
1230
1233
|
NG: {},
|
|
1231
1234
|
NI: {
|
|
1232
|
-
chars:
|
|
1233
|
-
bban_regexp: '^[A-Z]{4}[0-9]{
|
|
1235
|
+
chars: 28,
|
|
1236
|
+
bban_regexp: '^[A-Z]{4}[0-9]{20}$',
|
|
1234
1237
|
},
|
|
1235
1238
|
NL: {
|
|
1236
1239
|
chars: 18,
|
|
@@ -1421,7 +1424,7 @@ export var countrySpecs = {
|
|
|
1421
1424
|
US: {},
|
|
1422
1425
|
UY: {},
|
|
1423
1426
|
UZ: {},
|
|
1424
|
-
VA: { chars: 22, bban_regexp: '^[0-9]{18}', IBANRegistry: true },
|
|
1427
|
+
VA: { chars: 22, bban_regexp: '^[0-9]{18}', IBANRegistry: true, SEPA: true },
|
|
1425
1428
|
VC: {},
|
|
1426
1429
|
VE: {},
|
|
1427
1430
|
VG: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ibantools",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.4",
|
|
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",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"coveralls": "^3.1.1",
|
|
61
61
|
"docdash": "^2.0.0",
|
|
62
62
|
"eslint": "^8.0.0",
|
|
63
|
-
"eslint-config-prettier": "^
|
|
63
|
+
"eslint-config-prettier": "^9.0.0",
|
|
64
64
|
"eslint-plugin-prettier": "^4.0.0",
|
|
65
|
-
"jasmine-core": "^
|
|
65
|
+
"jasmine-core": "^5.0.0",
|
|
66
66
|
"karma": "^6.3.4",
|
|
67
67
|
"karma-chrome-launcher": "^3.1",
|
|
68
68
|
"karma-jasmine": "^5.0",
|