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 3.3.0 to 3.3.1

2

build/ibantools.d.ts

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

* // returns NL91ABNA0417164300
* ibantools.composeIBAN("NL", "ABNA0417164300");
* ibantools.composeIBAN({ countryCode: "NL", bban: "ABNA0417164300" });
* ```

@@ -84,0 +84,0 @@ */

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

* @module ibantools
* @version 3.3.0
* @version 3.3.1
* @license MPL-2.0

@@ -71,25 +71,23 @@ * @preferred

var spec = exports.countrySpecs[iban.slice(0, 2)];
if (spec === undefined) {
if (!spec || !(spec.bban_regexp || spec.chars)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.NoIBANCountry);
}
else {
if (spec.chars !== iban.length) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongBBANLength);
}
if (spec.bban_regexp && !checkFormatBBAN(iban.slice(4), spec.bban_regexp)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongBBANFormat);
}
var reg = new RegExp('^[0-9]{2}$', '');
if (!reg.test(iban.slice(2, 4))) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.ChecksumNotNumber);
}
if (!isValidIBANChecksum(iban)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongIBANChecksum);
}
if (spec && spec.chars && spec.chars !== iban.length) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongBBANLength);
}
if (spec && spec.bban_regexp && !checkFormatBBAN(iban.slice(4), spec.bban_regexp)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongBBANFormat);
}
var reg = new RegExp('^[0-9]{2}$', '');
if (!reg.test(iban.slice(2, 4))) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.ChecksumNotNumber);
}
if (!isValidIBANChecksum(iban)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongIBANChecksum);
}
}

@@ -158,3 +156,3 @@ else {

* // returns NL91ABNA0417164300
* ibantools.composeIBAN("NL", "ABNA0417164300");
* ibantools.composeIBAN({ countryCode: "NL", bban: "ABNA0417164300" });
* ```

@@ -249,2 +247,3 @@ */

var electronic_iban = electronicFormatIBAN(iban);
/* istanbul ignore if */
if (electronic_iban === null) {

@@ -437,2 +436,3 @@ return null;

IBANRegistry: true,
SEPA: true,
},

@@ -489,2 +489,3 @@ AE: {

IBANRegistry: true,
SEPA: true,
},

@@ -600,3 +601,3 @@ BH: {

FM: {},
FO: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true, SEPA: true },
FO: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true },
FR: {

@@ -637,3 +638,3 @@ chars: 27,

},
GL: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true, SEPA: true },
GL: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true },
GM: {},

@@ -640,0 +641,0 @@ GN: {},

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

* @module ibantools
* @version 3.3.0
* @version 3.3.1
* @license MPL-2.0

@@ -68,25 +68,23 @@ * @preferred

var spec = countrySpecs[iban.slice(0, 2)];
if (spec === undefined) {
if (!spec || !(spec.bban_regexp || spec.chars)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.NoIBANCountry);
}
else {
if (spec.chars !== iban.length) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongBBANLength);
}
if (spec.bban_regexp && !checkFormatBBAN(iban.slice(4), spec.bban_regexp)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongBBANFormat);
}
var reg = new RegExp('^[0-9]{2}$', '');
if (!reg.test(iban.slice(2, 4))) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.ChecksumNotNumber);
}
if (!isValidIBANChecksum(iban)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongIBANChecksum);
}
if (spec && spec.chars && spec.chars !== iban.length) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongBBANLength);
}
if (spec && spec.bban_regexp && !checkFormatBBAN(iban.slice(4), spec.bban_regexp)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongBBANFormat);
}
var reg = new RegExp('^[0-9]{2}$', '');
if (!reg.test(iban.slice(2, 4))) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.ChecksumNotNumber);
}
if (!isValidIBANChecksum(iban)) {
result.valid = false;
result.errorCodes.push(ValidationErrorsIBAN.WrongIBANChecksum);
}
}

@@ -152,3 +150,3 @@ else {

* // returns NL91ABNA0417164300
* ibantools.composeIBAN("NL", "ABNA0417164300");
* ibantools.composeIBAN({ countryCode: "NL", bban: "ABNA0417164300" });
* ```

@@ -240,2 +238,3 @@ */

var electronic_iban = electronicFormatIBAN(iban);
/* istanbul ignore if */
if (electronic_iban === null) {

@@ -423,2 +422,3 @@ return null;

IBANRegistry: true,
SEPA: true,
},

@@ -475,2 +475,3 @@ AE: {

IBANRegistry: true,
SEPA: true,
},

@@ -586,3 +587,3 @@ BH: {

FM: {},
FO: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true, SEPA: true },
FO: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true },
FR: {

@@ -623,3 +624,3 @@ chars: 27,

},
GL: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true, SEPA: true },
GL: { chars: 18, bban_regexp: '^[0-9]{14}$', IBANRegistry: true },
GM: {},

@@ -626,0 +627,0 @@ GN: {},

{
"name": "ibantools",
"version": "3.3.0",
"version": "3.3.1",
"description": "Validation, extraction and creation of IBAN, BBAN, BIC/SWIFT numbers plus some other helpful stuff like ISO 3136-1 alpha 2 country list",

@@ -53,11 +53,11 @@ "keywords": [

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.7.0",
"@typescript-eslint/parser": "^4.7.0",
"chai": "^4.2.0",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",
"chai": "^4.3.4",
"cheerio": "^0.22",
"coveralls": "^3.1.0",
"coveralls": "^3.1.1",
"docdash": "^1.2.0",
"eslint": "^7.13.0",
"eslint-config-prettier": "^8.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint": "^7.31.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"gulp": "^4.0.2",

@@ -68,4 +68,4 @@ "gulp-mocha": "^8.0",

"gulp-typescript": "^5.0",
"jasmine-core": "^3.6.0",
"karma": "^6.1",
"jasmine-core": "^3.8.0",
"karma": "^6.3.4",
"karma-chrome-launcher": "^3.1",

@@ -75,10 +75,10 @@ "karma-jasmine": "^4.0",

"merge2": "^1.4.1",
"mocha": "^8.2.0",
"mocha": "^9.0.2",
"mocha-lcov-reporter": "^1.2.0",
"nyc": "^15.1.0",
"prettier": "^2.1.2",
"prettier": "^2.3.2",
"requirejs": "^2.3.6",
"typedoc": "^0.20.30",
"typescript": "^4.0"
"typedoc": "^0.21.4",
"typescript": "^4.3.5"
}
}

Sorry, the diff of this file is not supported yet

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