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.2 to 4.3.3

31

build/ibantools.js

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

* @module ibantools
* @version 4.3.2
* @version 4.3.3
* @license MPL-2.0

@@ -195,3 +195,3 @@ * @preferred

var countryCode = iban.slice(0, 2);
var QRIBANCountries = ['LX', 'CH'];
var QRIBANCountries = ['LI', 'CH'];
if (!QRIBANCountries.includes(countryCode))

@@ -663,27 +663,2 @@ return false;

/**
* Finland (FI) BBAN check
*
* @ignore
*/
var checkFinlandBBAN = function (bban) {
var weights = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2];
var controlDigit = parseInt(bban.charAt(13), 10);
var toCheck = bban.substring(0, 13);
var sum = 0;
for (var index = 0; index < toCheck.length; index++) {
if (weights[index] === 1) {
sum += parseInt(toCheck.charAt(index), 10) * weights[index];
}
else {
var value = parseInt(toCheck.charAt(index), 10) * weights[index];
sum += Math.floor(value / 10) + (value % 10);
}
}
var extraSum = sum + controlDigit;
var multiDigit = Math.floor(extraSum / 10);
var result = multiDigit * 10;
var remainder = result - sum;
return remainder === controlDigit;
};
/**
* Check French (FR) BBAN

@@ -839,3 +814,2 @@ * Also for Monaco (MC)

bban_regexp: '^[0-9]{14}$',
bban_validation_func: checkFinlandBBAN,
IBANRegistry: true,

@@ -993,3 +967,2 @@ },

bban_regexp: '^[0-9]{14}$',
bban_validation_func: checkFinlandBBAN,
IBANRegistry: true,

@@ -996,0 +969,0 @@ SEPA: true,

43

jsnext/ibantools.js

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

* @module ibantools
* @version 4.3.0
* @version 4.3.3
* @license MPL-2.0

@@ -189,3 +189,3 @@ * @preferred

var countryCode = iban.slice(0, 2);
var QRIBANCountries = ['LX', 'CH'];
var QRIBANCountries = ['LI', 'CH'];
if (!QRIBANCountries.includes(countryCode))

@@ -648,27 +648,2 @@ return false;

/**
* Finland (FI) BBAN check
*
* @ignore
*/
var checkFinlandBBAN = function (bban) {
var weights = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2];
var controlDigit = parseInt(bban.charAt(13), 10);
var toCheck = bban.substring(0, 13);
var sum = 0;
for (var index = 0; index < toCheck.length; index++) {
if (weights[index] === 1) {
sum += parseInt(toCheck.charAt(index), 10) * weights[index];
}
else {
var value = parseInt(toCheck.charAt(index), 10) * weights[index];
sum += Math.floor(value / 10) + (value % 10);
}
}
var extraSum = sum + controlDigit;
var multiDigit = Math.floor(extraSum / 10);
var result = multiDigit * 10;
var remainder = result - sum;
return remainder === controlDigit;
};
/**
* Check French (FR) BBAN

@@ -823,3 +798,2 @@ * Also for Monaco (MC)

bban_regexp: '^[0-9]{14}$',
bban_validation_func: checkFinlandBBAN,
IBANRegistry: true,

@@ -977,3 +951,2 @@ },

bban_regexp: '^[0-9]{14}$',
bban_validation_func: checkFinlandBBAN,
IBANRegistry: true,

@@ -1354,3 +1327,7 @@ SEPA: true,

},
SD: {},
SD: {
chars: 18,
bban_regexp: '^[0-9]{14}$',
IBANRegistry: true,
},
SE: { chars: 24, bban_regexp: '^[0-9]{20}$', IBANRegistry: true, SEPA: true },

@@ -1385,3 +1362,7 @@ SG: {},

},
SO: {},
SO: {
chars: 23,
bban_regexp: '^[0-9]{19}$',
IBANRegistry: true,
},
SR: {},

@@ -1388,0 +1369,0 @@ SS: {},

{
"name": "ibantools",
"version": "4.3.2",
"version": "4.3.3",
"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