Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ibantools

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ibantools - npm Package Compare versions

Comparing version 4.3.7 to 4.3.8

3

build/ibantools.js

@@ -11,3 +11,3 @@ /*!

* @module ibantools
* @version 4.3.7
* @version 4.3.8
* @license MPL-2.0

@@ -808,3 +808,2 @@ * @preferred

.reduce(function (a, b) { return a + b; });
console.log(sum);
return sum % 11 === 0;

@@ -811,0 +810,0 @@ };

@@ -11,3 +11,3 @@ /*!

* @module ibantools
* @version 4.3.6
* @version 4.3.8
* @license MPL-2.0

@@ -766,2 +766,32 @@ * @preferred

/**
* Dutch (NL) BBAN check
*
* @ignore
*/
var checkDutchBBAN = function (bban) {
if (bban === '') {
return false;
}
var weights = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1];
var toCheckAccount = bban.substring(4, 14);
if (toCheckAccount.startsWith('000')) {
return true;
}
if (toCheckAccount.startsWith('00')) {
return false;
}
var sum = toCheckAccount
.split('')
.map(function (value, index) {
if (value === '0' && index === 0) {
return 0;
}
var number = parseInt(value, 10);
var weight = weights[index];
return number * weight;
})
.reduce(function (a, b) { return a + b; });
return sum % 11 === 0;
};
/**
* Set custom BBAN validation function for country.

@@ -1418,2 +1448,3 @@ *

bban_regexp: '^[A-Z]{4}[0-9]{10}$',
bban_validation_func: checkDutchBBAN,
IBANRegistry: true,

@@ -1420,0 +1451,0 @@ SEPA: true,

{
"name": "ibantools",
"version": "4.3.7",
"version": "4.3.8",
"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,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc