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 1.0.0 to 1.0.1

4

build/ibantools.js

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

* @see module:ibantools
* @version 1.0.0
* @version 1.0.1
* @license MPL-2.0
*/
"use strict";!function(e,a){if("object"==typeof module&&"object"==typeof module.exports){var n=a(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define(e,a)}(["require","exports"],function(e,a){function n(e){if(void 0!==e&&null!==e){var a=i(e),n=o[a.slice(0,2)];if(void 0!==n&&n.chars===a.length&&s(a.slice(4),n.bban_regexp)&&1===p(a))return!0}return!1}function r(e,a){if(void 0!==e&&null!==e&&void 0!==a&&null!==a){var n=i(e),r=o[a];if(void 0!==r&&r.chars-4===n.length&&s(n,r.bban_regexp))return!0}return!1}function b(e){var a=i(e.bban),n=o[e.countryCode];if(void 0!==n&&n.chars===a.length+4&&s(a,n.bban_regexp)){var r=p(e.countryCode+"00"+a);return e.countryCode+("0"+(98-r)).slice(-2)+a}return null}function c(e){var a={};if(e=i(e),n(e)){a.bban=e.slice(4),a.countryCode=e.slice(0,2);var r=o[a.countryCode];a.countryName=r.name,a.valid=!0}else a.valid=!1;return a}function s(e,a){var n=new RegExp(a,"");return n.test(e)}function i(e){return e.replace(/[^a-zA-Z0-9]/g,"").toUpperCase()}function t(e,a){return"undefined"==typeof a&&(a=" "),i(e).replace(/(.{4})(?!$)/g,"$1"+a)}function p(e){e=e.slice(3)+e.slice(0,4);for(var a="",n=1;n<e.length;n++){var r=e.charCodeAt(n);a+=r>=65?(r-55).toString():e[n]}for(;a.length>2;){var b=a.slice(0,6);a=(parseInt(b,10)%97).toString()+a.slice(b.length)}return parseInt(a,10)%97}function g(){return o}var o={};a.isValidIBAN=n,a.isValidBBAN=r,a.composeIBAN=b,a.extractIBAN=c,a.electonicFormatIBAN=i,a.friendlyFormatIBAN=t,a.getCountrySpecifications=g,o.AL={chars:28,bban_regexp:"^[0-9]{8}[A-Z0-9]{16}$",name:"Albania"},o.AD={chars:24,bban_regexp:"^[0-9]{8}[A-Z0-9]{12}$",name:"Andorra"},o.AT={chars:20,bban_regexp:"^[0-9]{16}$",name:"Austria"},o.AZ={chars:28,bban_regexp:"^[A-Z0-9]{4}[0-9]{20}$",name:"Azerbaijan"},o.BH={chars:22,bban_regexp:"^[A-Z]{4}[A-Z0-9]{14}$",name:"Bahrain"},o.BE={chars:16,bban_regexp:"^[0-9]{12}$",name:"Belgium"},o.BA={chars:20,bban_regexp:"^[0-9]{16}$",name:"Bosnia and Herzegovina"},o.BR={chars:29,bban_regexp:"^[0-9]{23}[A-Z]{1}[A-Z0-9]{1}$",name:"Brazil"},o.BG={chars:22,bban_regexp:"^[A-Z]{4}[0-9]{6}[A-Z0-9]{8}$",name:"Bulgaria"},o.CR={chars:21,bban_regexp:"^[0-9]{17}$",name:"Costa Rica"},o.HR={chars:21,bban_regexp:"^[0-9]{17}$",name:"Croatia"},o.CY={chars:28,bban_regexp:"^[0-9]{8}[A-Z0-9]{16}$",name:"Cyprus"},o.CZ={chars:24,bban_regexp:"^[0-9]{20}$",name:"Czech Republic"},o.DK={chars:18,bban_regexp:"^[0-9]{14}$",name:"Denmark"},o.DO={chars:28,bban_regexp:"^[A-Z]{4}[0-9]{20}$",name:"Dominican Republic"},o.TL={chars:23,bban_regexp:"^[0-9]{19}$",name:"East Timor"},o.EE={chars:20,bban_regexp:"^[0-9]{16}$",name:"Estonia"},o.FO={chars:18,bban_regexp:"^[0-9]{14}$",name:"Faroe Islands"},o.FI={chars:18,bban_regexp:"^[0-9]{14}$",name:"Finland"},o.FR={chars:27,bban_regexp:"^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",name:"France"},o.GE={chars:22,bban_regexp:"^[A-Z0-9]{2}[0-9]{16}$",name:"Georgia (country)"},o.DE={chars:22,bban_regexp:"^[0-9]{18}$",name:"Germany"},o.GI={chars:23,bban_regexp:"^[A-Z]{4}[A-Z0-9]{15}$",name:"Gibraltar"},o.GR={chars:27,bban_regexp:"^[0-9]{7}[A-Z0-9]{16}$",name:"Greece"},o.GL={chars:18,bban_regexp:"^[0-9]{14}$",name:"Greenland"},o.GT={chars:28,bban_regexp:"^[A-Z0-9]{4}[A-Z0-9]{20}$",name:"Guatemala"},o.HU={chars:28,bban_regexp:"^[0-9]{24}$",name:"Hungary"},o.IS={chars:26,bban_regexp:"^[0-9]{22}$",name:"Iceland"},o.IE={chars:22,bban_regexp:"^[A-Z0-9]{4}[0-9]{14}$",name:"Republic of Ireland"},o.IL={chars:23,bban_regexp:"^[0-9]{19}$",name:"Israel"},o.IT={chars:27,bban_regexp:"^[A-Z]{1}[0-9]{10}[A-Z0-9]{12}$",name:"Italy"},o.JO={chars:30,bban_regexp:"^[A-Z]{4}[0-9]{22}$",name:"Jordan"},o.KZ={chars:20,bban_regexp:"^[0-9]{3}[A-Z0-9]{13}$",name:"Kazakhstan"},o.XK={chars:20,bban_regexp:"^[0-9]{4}[0-9]{10}[0-9]{2}$",name:"Kosovo"},o.KW={chars:30,bban_regexp:"^[A-Z]{4}[A-Z0-9]{22}$",name:"Kuwait"},o.LV={chars:21,bban_regexp:"^[A-Z]{4}[A-Z0-9]{13}$",name:"Latvia"},o.LB={chars:28,bban_regexp:"^[0-9]{4}[A-Z0-9]{20}$",name:"Lebanon"},o.LI={chars:21,bban_regexp:"^[0-9]{5}[A-Z0-9]{12}$",name:"Liechtenstein"},o.LT={chars:20,bban_regexp:"^[0-9]{16}$",name:"Lithuania"},o.LU={chars:20,bban_regexp:"^[0-9]{3}[A-Z0-9]{13}$",name:"Luxembourg"},o.MK={chars:19,bban_regexp:"^[0-9]{3}[A-Z0-9]{10}[0-9]{2}$",name:"Republic of Macedonia"},o.MT={chars:31,bban_regexp:"^[A-Z]{4}[0-9]{5}[A-Z0-9]{18}$",name:"Malta"},o.MR={chars:27,bban_regexp:"^[0-9]{23}$",name:"Mauritania"},o.MU={chars:30,bban_regexp:"^[A-Z]{4}[0-9]{19}[A-Z]{3}$",name:"Mauritius"},o.MC={chars:27,bban_regexp:"^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",name:"Monaco"},o.MD={chars:24,bban_regexp:"^[A-Z0-9]{2}[A-Z0-9]{18}$",name:"Moldova"},o.ME={chars:22,bban_regexp:"^[0-9]{18}$",name:"Montenegro"},o.NL={chars:18,bban_regexp:"^[A-Z]{4}[0-9]{10}$",name:"Netherlands"},o.NO={chars:15,bban_regexp:"^[0-9]{11}$",name:"Norway"},o.PK={chars:24,bban_regexp:"^[A-Z0-9]{4}[0-9]{16}$",name:"Pakistan"},o.PS={chars:29,bban_regexp:"^[A-Z0-9]{4}[0-9]{21}$",name:"Palestinian territories"},o.PL={chars:28,bban_regexp:"^[0-9]{24}$",name:"Poland"},o.PT={chars:25,bban_regexp:"^[0-9]{21}$",name:"Portugal"},o.QA={chars:29,bban_regexp:"^[A-Z]{4}[A-Z0-9]{21}$",name:"Qatar"},o.RO={chars:24,bban_regexp:"^[A-Z]{4}[A-Z0-9]{16}$",name:"Romania"},o.SM={chars:27,bban_regexp:"^[A-Z]{1}[0-9]{10}[A-Z0-9]{12}$",name:"San Marino"},o.SA={chars:24,bban_regexp:"^[0-9]{2}[A-Z0-9]{18}$",name:"Saudi Arabia"},o.RS={chars:22,bban_regexp:"^[0-9]{18}$",name:"Serbia"},o.SK={chars:24,bban_regexp:"^[0-9]{20}$",name:"Slovakia"},o.SI={chars:19,bban_regexp:"^[0-9]{15}$",name:"Slovenia"},o.ES={chars:24,bban_regexp:"^[0-9]{20}$",name:"Spain"},o.SE={chars:24,bban_regexp:"^[0-9]{20}$",name:"Sweden"},o.CH={chars:21,bban_regexp:"^[0-9]{5}[A-Z0-9]{12}$",name:"Switzerland"},o.TN={chars:24,bban_regexp:"^[0-9]{20}$",name:"Tunisia"},o.TR={chars:26,bban_regexp:"^[0-9]{5}[A-Z0-9]{17}$",name:"Turkey"},o.AE={chars:23,bban_regexp:"^[0-9]{3}[0-9]{16}$",name:"United Arab Emirates"},o.GB={chars:22,bban_regexp:"^[A-Z]{4}[0-9]{14}$",name:"United Kingdom"},o.VG={chars:24,bban_regexp:"^[A-Z0-9]{4}[0-9]{16}$",name:"British Virgin Islands"}});
"use strict";!function(e,a){if("object"==typeof module&&"object"==typeof module.exports){var n=a(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define(e,a)}(["require","exports"],function(e,a){function n(e){if(void 0!==e&&null!==e){var a=i(e),n=o[a.slice(0,2)];if(void 0!==n&&n.chars===a.length&&s(a.slice(4),n.bban_regexp)&&1===p(a))return!0}return!1}function r(e,a){if(void 0!==e&&null!==e&&void 0!==a&&null!==a){var n=i(e),r=o[a];if(void 0!==r&&r.chars-4===n.length&&s(n,r.bban_regexp))return!0}return!1}function b(e){var a=i(e.bban),n=o[e.countryCode];if(null!==a&&void 0!==n&&n.chars===a.length+4&&s(a,n.bban_regexp)){var r=p(e.countryCode+"00"+a);return e.countryCode+("0"+(98-r)).slice(-2)+a}return null}function c(e){var a={};if(e=i(e),n(e)){a.bban=e.slice(4),a.countryCode=e.slice(0,2);var r=o[a.countryCode];a.countryName=r.name,a.valid=!0}else a.valid=!1;return a}function s(e,a){var n=new RegExp(a,"");return n.test(e)}function i(e){return void 0===e||null===e?null:e.replace(/[^a-zA-Z0-9]/g,"").toUpperCase()}function t(e,a){return"undefined"==typeof a&&(a=" "),i(e).replace(/(.{4})(?!$)/g,"$1"+a)}function p(e){e=e.slice(3)+e.slice(0,4);for(var a="",n=1;n<e.length;n++){var r=e.charCodeAt(n);a+=r>=65?(r-55).toString():e[n]}for(;a.length>2;){var b=a.slice(0,6);a=(parseInt(b,10)%97).toString()+a.slice(b.length)}return parseInt(a,10)%97}function g(){return o}var o={};a.isValidIBAN=n,a.isValidBBAN=r,a.composeIBAN=b,a.extractIBAN=c,a.electonicFormatIBAN=i,a.friendlyFormatIBAN=t,a.getCountrySpecifications=g,o.AL={chars:28,bban_regexp:"^[0-9]{8}[A-Z0-9]{16}$",name:"Albania"},o.AD={chars:24,bban_regexp:"^[0-9]{8}[A-Z0-9]{12}$",name:"Andorra"},o.AT={chars:20,bban_regexp:"^[0-9]{16}$",name:"Austria"},o.AZ={chars:28,bban_regexp:"^[A-Z0-9]{4}[0-9]{20}$",name:"Azerbaijan"},o.BH={chars:22,bban_regexp:"^[A-Z]{4}[A-Z0-9]{14}$",name:"Bahrain"},o.BE={chars:16,bban_regexp:"^[0-9]{12}$",name:"Belgium"},o.BA={chars:20,bban_regexp:"^[0-9]{16}$",name:"Bosnia and Herzegovina"},o.BR={chars:29,bban_regexp:"^[0-9]{23}[A-Z]{1}[A-Z0-9]{1}$",name:"Brazil"},o.BG={chars:22,bban_regexp:"^[A-Z]{4}[0-9]{6}[A-Z0-9]{8}$",name:"Bulgaria"},o.CR={chars:21,bban_regexp:"^[0-9]{17}$",name:"Costa Rica"},o.HR={chars:21,bban_regexp:"^[0-9]{17}$",name:"Croatia"},o.CY={chars:28,bban_regexp:"^[0-9]{8}[A-Z0-9]{16}$",name:"Cyprus"},o.CZ={chars:24,bban_regexp:"^[0-9]{20}$",name:"Czech Republic"},o.DK={chars:18,bban_regexp:"^[0-9]{14}$",name:"Denmark"},o.DO={chars:28,bban_regexp:"^[A-Z]{4}[0-9]{20}$",name:"Dominican Republic"},o.TL={chars:23,bban_regexp:"^[0-9]{19}$",name:"East Timor"},o.EE={chars:20,bban_regexp:"^[0-9]{16}$",name:"Estonia"},o.FO={chars:18,bban_regexp:"^[0-9]{14}$",name:"Faroe Islands"},o.FI={chars:18,bban_regexp:"^[0-9]{14}$",name:"Finland"},o.FR={chars:27,bban_regexp:"^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",name:"France"},o.GE={chars:22,bban_regexp:"^[A-Z0-9]{2}[0-9]{16}$",name:"Georgia (country)"},o.DE={chars:22,bban_regexp:"^[0-9]{18}$",name:"Germany"},o.GI={chars:23,bban_regexp:"^[A-Z]{4}[A-Z0-9]{15}$",name:"Gibraltar"},o.GR={chars:27,bban_regexp:"^[0-9]{7}[A-Z0-9]{16}$",name:"Greece"},o.GL={chars:18,bban_regexp:"^[0-9]{14}$",name:"Greenland"},o.GT={chars:28,bban_regexp:"^[A-Z0-9]{4}[A-Z0-9]{20}$",name:"Guatemala"},o.HU={chars:28,bban_regexp:"^[0-9]{24}$",name:"Hungary"},o.IS={chars:26,bban_regexp:"^[0-9]{22}$",name:"Iceland"},o.IE={chars:22,bban_regexp:"^[A-Z0-9]{4}[0-9]{14}$",name:"Republic of Ireland"},o.IL={chars:23,bban_regexp:"^[0-9]{19}$",name:"Israel"},o.IT={chars:27,bban_regexp:"^[A-Z]{1}[0-9]{10}[A-Z0-9]{12}$",name:"Italy"},o.JO={chars:30,bban_regexp:"^[A-Z]{4}[0-9]{22}$",name:"Jordan"},o.KZ={chars:20,bban_regexp:"^[0-9]{3}[A-Z0-9]{13}$",name:"Kazakhstan"},o.XK={chars:20,bban_regexp:"^[0-9]{4}[0-9]{10}[0-9]{2}$",name:"Kosovo"},o.KW={chars:30,bban_regexp:"^[A-Z]{4}[A-Z0-9]{22}$",name:"Kuwait"},o.LV={chars:21,bban_regexp:"^[A-Z]{4}[A-Z0-9]{13}$",name:"Latvia"},o.LB={chars:28,bban_regexp:"^[0-9]{4}[A-Z0-9]{20}$",name:"Lebanon"},o.LI={chars:21,bban_regexp:"^[0-9]{5}[A-Z0-9]{12}$",name:"Liechtenstein"},o.LT={chars:20,bban_regexp:"^[0-9]{16}$",name:"Lithuania"},o.LU={chars:20,bban_regexp:"^[0-9]{3}[A-Z0-9]{13}$",name:"Luxembourg"},o.MK={chars:19,bban_regexp:"^[0-9]{3}[A-Z0-9]{10}[0-9]{2}$",name:"Republic of Macedonia"},o.MT={chars:31,bban_regexp:"^[A-Z]{4}[0-9]{5}[A-Z0-9]{18}$",name:"Malta"},o.MR={chars:27,bban_regexp:"^[0-9]{23}$",name:"Mauritania"},o.MU={chars:30,bban_regexp:"^[A-Z]{4}[0-9]{19}[A-Z]{3}$",name:"Mauritius"},o.MC={chars:27,bban_regexp:"^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",name:"Monaco"},o.MD={chars:24,bban_regexp:"^[A-Z0-9]{2}[A-Z0-9]{18}$",name:"Moldova"},o.ME={chars:22,bban_regexp:"^[0-9]{18}$",name:"Montenegro"},o.NL={chars:18,bban_regexp:"^[A-Z]{4}[0-9]{10}$",name:"Netherlands"},o.NO={chars:15,bban_regexp:"^[0-9]{11}$",name:"Norway"},o.PK={chars:24,bban_regexp:"^[A-Z0-9]{4}[0-9]{16}$",name:"Pakistan"},o.PS={chars:29,bban_regexp:"^[A-Z0-9]{4}[0-9]{21}$",name:"Palestinian territories"},o.PL={chars:28,bban_regexp:"^[0-9]{24}$",name:"Poland"},o.PT={chars:25,bban_regexp:"^[0-9]{21}$",name:"Portugal"},o.QA={chars:29,bban_regexp:"^[A-Z]{4}[A-Z0-9]{21}$",name:"Qatar"},o.RO={chars:24,bban_regexp:"^[A-Z]{4}[A-Z0-9]{16}$",name:"Romania"},o.SM={chars:27,bban_regexp:"^[A-Z]{1}[0-9]{10}[A-Z0-9]{12}$",name:"San Marino"},o.SA={chars:24,bban_regexp:"^[0-9]{2}[A-Z0-9]{18}$",name:"Saudi Arabia"},o.RS={chars:22,bban_regexp:"^[0-9]{18}$",name:"Serbia"},o.SK={chars:24,bban_regexp:"^[0-9]{20}$",name:"Slovakia"},o.SI={chars:19,bban_regexp:"^[0-9]{15}$",name:"Slovenia"},o.ES={chars:24,bban_regexp:"^[0-9]{20}$",name:"Spain"},o.SE={chars:24,bban_regexp:"^[0-9]{20}$",name:"Sweden"},o.CH={chars:21,bban_regexp:"^[0-9]{5}[A-Z0-9]{12}$",name:"Switzerland"},o.TN={chars:24,bban_regexp:"^[0-9]{20}$",name:"Tunisia"},o.TR={chars:26,bban_regexp:"^[0-9]{5}[A-Z0-9]{17}$",name:"Turkey"},o.AE={chars:23,bban_regexp:"^[0-9]{3}[0-9]{16}$",name:"United Arab Emirates"},o.GB={chars:22,bban_regexp:"^[A-Z]{4}[0-9]{14}$",name:"United Kingdom"},o.VG={chars:24,bban_regexp:"^[A-Z0-9]{4}[0-9]{16}$",name:"British Virgin Islands"}});
{
"name": "ibantools",
"version": "1.0.0",
"version": "1.0.1",
"description": "Validation of IBAN numbers and generation of IBAN's plus some other helpful stuff",

@@ -27,5 +27,5 @@ "keywords": [

"scripts": {
"test": "gulp test",
"test": "gulp test-it",
"getcc": "node scripts/getcc.js",
"coverage": "istanbul cover _mocha -- -R spec"
"coverage": "gulp coverage"
},

@@ -32,0 +32,0 @@ "author": {

@@ -5,2 +5,8 @@ # IBANTools

[![npm version](https://badge.fury.io/js/ibantools.svg)](https://badge.fury.io/js/ibantools)
[![devDependency Status](https://david-dm.org/simplify/ibantools/dev-status.svg)](https://david-dm.org/simplify/ibantools#info=devDependencies)
[![Dependency Status](https://david-dm.org/simplify/ibantools.svg)](https://david-dm.org/simplify/ibantools)
IBANTools is JavaScript library for validation, creation and extraction of IBAN's.

@@ -7,0 +13,0 @@

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