Comparing version 4.1.3 to 4.1.4
@@ -11,3 +11,3 @@ /*! | ||
* @module ibantools | ||
* @version 4.1.3 | ||
* @version 4.1.4 | ||
* @license MPL-2.0 | ||
@@ -448,19 +448,2 @@ * @preferred | ||
/** | ||
* Used for Netherlands BBAN check | ||
* | ||
* @ignore | ||
*/ | ||
var checkDutchBBAN = function (bban) { | ||
var bbanWithoutSpacesAndPeriods = bban.replace(/[\s.]+/g, ''); | ||
var accountNumber = bbanWithoutSpacesAndPeriods.substring(4, 14); | ||
if (accountNumber.startsWith('000')) { | ||
return true; // Postbank account, no `elfproef` possible | ||
} | ||
var sum = 0; | ||
for (var index = 0; index < 10; index++) { | ||
sum += parseInt(accountNumber.charAt(index), 10) * (10 - index); | ||
} | ||
return sum % 11 === 0; | ||
}; | ||
/** | ||
* Used for Belgian BBAN check | ||
@@ -1233,3 +1216,2 @@ * | ||
bban_regexp: '^[A-Z]{4}[0-9]{10}$', | ||
bban_validation_func: checkDutchBBAN, | ||
IBANRegistry: true, | ||
@@ -1236,0 +1218,0 @@ SEPA: true, |
@@ -11,3 +11,3 @@ /*! | ||
* @module ibantools | ||
* @version 4.1.3 | ||
* @version 4.1.4 | ||
* @license MPL-2.0 | ||
@@ -434,19 +434,2 @@ * @preferred | ||
/** | ||
* Used for Netherlands BBAN check | ||
* | ||
* @ignore | ||
*/ | ||
var checkDutchBBAN = function (bban) { | ||
var bbanWithoutSpacesAndPeriods = bban.replace(/[\s.]+/g, ''); | ||
var accountNumber = bbanWithoutSpacesAndPeriods.substring(4, 14); | ||
if (accountNumber.startsWith('000')) { | ||
return true; // Postbank account, no `elfproef` possible | ||
} | ||
var sum = 0; | ||
for (var index = 0; index < 10; index++) { | ||
sum += parseInt(accountNumber.charAt(index), 10) * (10 - index); | ||
} | ||
return sum % 11 === 0; | ||
}; | ||
/** | ||
* Used for Belgian BBAN check | ||
@@ -1219,3 +1202,2 @@ * | ||
bban_regexp: '^[A-Z]{4}[0-9]{10}$', | ||
bban_validation_func: checkDutchBBAN, | ||
IBANRegistry: true, | ||
@@ -1222,0 +1204,0 @@ SEPA: true, |
{ | ||
"name": "ibantools", | ||
"version": "4.1.3", | ||
"version": "4.1.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", | ||
@@ -67,3 +67,3 @@ "keywords": [ | ||
"gulp-typescript": "^5.0", | ||
"jasmine-core": "^3.8.0", | ||
"jasmine-core": "^4.0.0", | ||
"karma": "^6.3.4", | ||
@@ -70,0 +70,0 @@ "karma-chrome-launcher": "^3.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115811
3046