New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iban-ts

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iban-ts - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

4

dist/iban-ts.cjs.development.js

@@ -19,2 +19,6 @@ 'use strict';

function Specification(countryCode, length, structure, example) {
this.countryCode = void 0;
this.length = void 0;
this.structure = void 0;
this.example = void 0;
this._cachedRegex = null;

@@ -21,0 +25,0 @@ this.countryCode = countryCode;

2

dist/iban-ts.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="A".charCodeAt(0),F="Z".charCodeAt(0),n=function(){function n(e,F,n,r){this._cachedRegex=null,this.countryCode=e,this.length=F,this.structure=n,this.example=r}var r=n.prototype;return r.isValid=function(e){return this.length===e.length&&this.countryCode===e.slice(0,2)&&this._regex().test(e.slice(4))&&1===this.iso7064Mod97_10(this.iso13616Prepare(e))},r.toBBAN=function(e,F){var n,r;return null==(n=this._regex())||null==(r=n.exec(e.slice(4)))?void 0:r.slice(1).join(F)},r.fromBBAN=function(e){if(!this.isValidBBAN(e))throw new Error("Invalid BBAN");var F=("0"+(98-this.iso7064Mod97_10(this.iso13616Prepare(this.countryCode+"00"+e)))).slice(-2);return this.countryCode+F+e},r.isValidBBAN=function(e){return this.length-4===e.length&&this._regex().test(e)},r._regex=function(){return this._cachedRegex||(this._cachedRegex=this.parseStructure(this.structure))},r.iso13616Prepare=function(n){return(n=(n=n.toUpperCase()).substr(4)+n.substr(0,4)).split("").map((function(n){var r=n.charCodeAt(0);return r>=e&&r<=F?r-e+10:n})).join("")},r.parseStructure=function(e){var F,n=null==(F=e.match(/(.{3})/g))?void 0:F.map((function(e){var F,n=e.slice(0,1),r=parseInt(e.slice(1),10);switch(n){case"A":F="0-9A-Za-z";break;case"B":F="0-9A-Z";break;case"C":F="A-Za-z";break;case"F":F="0-9";break;case"L":F="a-z";break;case"U":F="A-Z";break;case"W":F="0-9a-z"}return"(["+F+"]{"+r+"})"}));return new RegExp("^"+(null==n?void 0:n.join(""))+"$")},r.iso7064Mod97_10=function(e){for(var F,n=e;n.length>2;)F=n.slice(0,9),n=parseInt(F,10)%97+n.slice(F.length);return parseInt(n,10)%97},n}(),r=function(e){return e.replace(w,"").toUpperCase()},t={},A=function(e){t[e.countryCode]=e};A(new n("AD",24,"F04F04A12","AD1200012030200359100100")),A(new n("AE",23,"F03F16","AE070331234567890123456")),A(new n("AL",28,"F08A16","AL47212110090000000235698741")),A(new n("AT",20,"F05F11","AT611904300234573201")),A(new n("AZ",28,"U04A20","AZ21NABZ00000000137010001944")),A(new n("BA",20,"F03F03F08F02","BA391290079401028494")),A(new n("BE",16,"F03F07F02","BE68539007547034")),A(new n("BG",22,"U04F04F02A08","BG80BNBG96611020345678")),A(new n("BH",22,"U04A14","BH67BMAG00001299123456")),A(new n("BR",29,"F08F05F10U01A01","BR9700360305000010009795493P1")),A(new n("BY",28,"A04F04A16","BY13NBRB3600900000002Z00AB00")),A(new n("CH",21,"F05A12","CH9300762011623852957")),A(new n("CR",22,"F04F14","CR72012300000171549015")),A(new n("CY",28,"F03F05A16","CY17002001280000001200527600")),A(new n("CZ",24,"F04F06F10","CZ6508000000192000145399")),A(new n("DE",22,"F08F10","DE89370400440532013000")),A(new n("DK",18,"F04F09F01","DK5000400440116243")),A(new n("DO",28,"U04F20","DO28BAGR00000001212453611324")),A(new n("EE",20,"F02F02F11F01","EE382200221020145685")),A(new n("EG",29,"F04F04F17","EG800002000156789012345180002")),A(new n("ES",24,"F04F04F01F01F10","ES9121000418450200051332")),A(new n("FI",18,"F06F07F01","FI2112345600000785")),A(new n("FO",18,"F04F09F01","FO6264600001631634")),A(new n("FR",27,"F05F05A11F02","FR1420041010050500013M02606")),A(new n("GB",22,"U04F06F08","GB29NWBK60161331926819")),A(new n("GE",22,"U02F16","GE29NB0000000101904917")),A(new n("GI",23,"U04A15","GI75NWBK000000007099453")),A(new n("GL",18,"F04F09F01","GL8964710001000206")),A(new n("GR",27,"F03F04A16","GR1601101250000000012300695")),A(new n("GT",28,"A04A20","GT82TRAJ01020000001210029690")),A(new n("HR",21,"F07F10","HR1210010051863000160")),A(new n("HU",28,"F03F04F01F15F01","HU42117730161111101800000000")),A(new n("IE",22,"U04F06F08","IE29AIBK93115212345678")),A(new n("IL",23,"F03F03F13","IL620108000000099999999")),A(new n("IS",26,"F04F02F06F10","IS140159260076545510730339")),A(new n("IT",27,"U01F05F05A12","IT60X0542811101000000123456")),A(new n("IQ",23,"U04F03A12","IQ98NBIQ850123456789012")),A(new n("JO",30,"A04F22","JO15AAAA1234567890123456789012")),A(new n("KW",30,"U04A22","KW81CBKU0000000000001234560101")),A(new n("KZ",20,"F03A13","KZ86125KZT5004100100")),A(new n("LB",28,"F04A20","LB62099900000001001901229114")),A(new n("LC",32,"U04F24","LC07HEMM000100010012001200013015")),A(new n("LI",21,"F05A12","LI21088100002324013AA")),A(new n("LT",20,"F05F11","LT121000011101001000")),A(new n("LU",20,"F03A13","LU280019400644750000")),A(new n("LV",21,"U04A13","LV80BANK0000435195001")),A(new n("MC",27,"F05F05A11F02","MC5811222000010123456789030")),A(new n("MD",24,"U02A18","MD24AG000225100013104168")),A(new n("ME",22,"F03F13F02","ME25505000012345678951")),A(new n("MK",19,"F03A10F02","MK07250120000058984")),A(new n("MR",27,"F05F05F11F02","MR1300020001010000123456753")),A(new n("MT",31,"U04F05A18","MT84MALT011000012345MTLCAST001S")),A(new n("MU",30,"U04F02F02F12F03U03","MU17BOMM0101101030300200000MUR")),A(new n("NL",18,"U04F10","NL91ABNA0417164300")),A(new n("NO",15,"F04F06F01","NO9386011117947")),A(new n("PK",24,"U04A16","PK36SCBL0000001123456702")),A(new n("PL",28,"F08F16","PL61109010140000071219812874")),A(new n("PS",29,"U04A21","PS92PALS000000000400123456702")),A(new n("PT",25,"F04F04F11F02","PT50000201231234567890154")),A(new n("QA",29,"U04A21","QA30AAAA123456789012345678901")),A(new n("RO",24,"U04A16","RO49AAAA1B31007593840000")),A(new n("RS",22,"F03F13F02","RS35260005601001611379")),A(new n("SA",24,"F02A18","SA0380000000608010167519")),A(new n("SC",31,"U04F04F16U03","SC18SSCB11010000000000001497USD")),A(new n("SE",24,"F03F16F01","SE4550000000058398257466")),A(new n("SI",19,"F05F08F02","SI56263300012039086")),A(new n("SK",24,"F04F06F10","SK3112000000198742637541")),A(new n("SM",27,"U01F05F05A12","SM86U0322509800000000270100")),A(new n("ST",25,"F08F11F02","ST68000100010051845310112")),A(new n("SV",28,"U04F20","SV62CENR00000000000000700025")),A(new n("TL",23,"F03F14F02","TL380080012345678910157")),A(new n("TN",24,"F02F03F13F02","TN5910006035183598478831")),A(new n("TR",26,"F05F01A16","TR330006100519786457841326")),A(new n("UA",29,"F25","UA511234567890123456789012345")),A(new n("VA",22,"F18","VA59001123000012345678")),A(new n("VG",24,"U04F16","VG96VPVG0000012345678901")),A(new n("XK",20,"F04F10F02","XK051212012345678906")),A(new n("AO",25,"F21","AO69123456789012345678901")),A(new n("BF",27,"F23","BF2312345678901234567890123")),A(new n("BI",16,"F12","BI41123456789012")),A(new n("BJ",28,"F24","BJ39123456789012345678901234")),A(new n("CI",28,"U02F22","CI70CI1234567890123456789012")),A(new n("CM",27,"F23","CM9012345678901234567890123")),A(new n("CV",25,"F21","CV30123456789012345678901")),A(new n("DZ",24,"F20","DZ8612345678901234567890")),A(new n("IR",26,"F22","IR861234568790123456789012")),A(new n("MG",27,"F23","MG1812345678901234567890123")),A(new n("ML",28,"U01F23","ML15A12345678901234567890123")),A(new n("MZ",25,"F21","MZ25123456789012345678901")),A(new n("SN",28,"U01F23","SN52A12345678901234567890123")),A(new n("GF",27,"F05F05A11F02","GF121234512345123456789AB13")),A(new n("GP",27,"F05F05A11F02","GP791234512345123456789AB13")),A(new n("MQ",27,"F05F05A11F02","MQ221234512345123456789AB13")),A(new n("RE",27,"F05F05A11F02","RE131234512345123456789AB13")),A(new n("PF",27,"F05F05A11F02","PF281234512345123456789AB13")),A(new n("TF",27,"F05F05A11F02","TF891234512345123456789AB13")),A(new n("YT",27,"F05F05A11F02","YT021234512345123456789AB13")),A(new n("NC",27,"F05F05A11F02","NC551234512345123456789AB13")),A(new n("BL",27,"F05F05A11F02","BL391234512345123456789AB13")),A(new n("MF",27,"F05F05A11F02","MF551234512345123456789AB13")),A(new n("PM",27,"F05F05A11F02","PM071234512345123456789AB13")),A(new n("WF",27,"F05F05A11F02","WF621234512345123456789AB13"));var w=/[^a-zA-Z0-9]/g,i=/(.{4})(?!$)/g,o=function(e){return"string"==typeof e||e instanceof String};exports.countries=t,exports.electronicFormat=r,exports.fromBBAN=function(e,F){var n=t[e];if(!n)throw new Error("No country with code "+e);return n.fromBBAN(r(F))},exports.isValid=function(e){if(!o(e))return!1;e=r(e);var F=t[e.slice(0,2)];return!!F&&F.isValid(e)},exports.isValidBBAN=function(e,F){if(!o(F))return!1;var n=t[e];return null==n?void 0:n.isValidBBAN(r(F))},exports.printFormat=function(e,F){return void 0===F&&(F=" "),r(e).replace(i,"$1"+F)},exports.toBBAN=function(e,F){void 0===F&&(F=" "),e=r(e);var n=t[e.slice(0,2)];if(!n)throw new Error("No country with code "+e.slice(0,2));return n.toBBAN(e,F)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="A".charCodeAt(0),F="Z".charCodeAt(0),n=function(){function n(e,F,n,t){this.countryCode=void 0,this.length=void 0,this.structure=void 0,this.example=void 0,this._cachedRegex=null,this.countryCode=e,this.length=F,this.structure=n,this.example=t}var t=n.prototype;return t.isValid=function(e){return this.length===e.length&&this.countryCode===e.slice(0,2)&&this._regex().test(e.slice(4))&&1===this.iso7064Mod97_10(this.iso13616Prepare(e))},t.toBBAN=function(e,F){var n,t;return null==(n=this._regex())||null==(t=n.exec(e.slice(4)))?void 0:t.slice(1).join(F)},t.fromBBAN=function(e){if(!this.isValidBBAN(e))throw new Error("Invalid BBAN");var F=("0"+(98-this.iso7064Mod97_10(this.iso13616Prepare(this.countryCode+"00"+e)))).slice(-2);return this.countryCode+F+e},t.isValidBBAN=function(e){return this.length-4===e.length&&this._regex().test(e)},t._regex=function(){return this._cachedRegex||(this._cachedRegex=this.parseStructure(this.structure))},t.iso13616Prepare=function(n){return(n=(n=n.toUpperCase()).substr(4)+n.substr(0,4)).split("").map((function(n){var t=n.charCodeAt(0);return t>=e&&t<=F?t-e+10:n})).join("")},t.parseStructure=function(e){var F,n=null==(F=e.match(/(.{3})/g))?void 0:F.map((function(e){var F,n=e.slice(0,1),t=parseInt(e.slice(1),10);switch(n){case"A":F="0-9A-Za-z";break;case"B":F="0-9A-Z";break;case"C":F="A-Za-z";break;case"F":F="0-9";break;case"L":F="a-z";break;case"U":F="A-Z";break;case"W":F="0-9a-z"}return"(["+F+"]{"+t+"})"}));return new RegExp("^"+(null==n?void 0:n.join(""))+"$")},t.iso7064Mod97_10=function(e){for(var F,n=e;n.length>2;)F=n.slice(0,9),n=parseInt(F,10)%97+n.slice(F.length);return parseInt(n,10)%97},n}(),t=function(e){return e.replace(w,"").toUpperCase()},r={},A=function(e){r[e.countryCode]=e};A(new n("AD",24,"F04F04A12","AD1200012030200359100100")),A(new n("AE",23,"F03F16","AE070331234567890123456")),A(new n("AL",28,"F08A16","AL47212110090000000235698741")),A(new n("AT",20,"F05F11","AT611904300234573201")),A(new n("AZ",28,"U04A20","AZ21NABZ00000000137010001944")),A(new n("BA",20,"F03F03F08F02","BA391290079401028494")),A(new n("BE",16,"F03F07F02","BE68539007547034")),A(new n("BG",22,"U04F04F02A08","BG80BNBG96611020345678")),A(new n("BH",22,"U04A14","BH67BMAG00001299123456")),A(new n("BR",29,"F08F05F10U01A01","BR9700360305000010009795493P1")),A(new n("BY",28,"A04F04A16","BY13NBRB3600900000002Z00AB00")),A(new n("CH",21,"F05A12","CH9300762011623852957")),A(new n("CR",22,"F04F14","CR72012300000171549015")),A(new n("CY",28,"F03F05A16","CY17002001280000001200527600")),A(new n("CZ",24,"F04F06F10","CZ6508000000192000145399")),A(new n("DE",22,"F08F10","DE89370400440532013000")),A(new n("DK",18,"F04F09F01","DK5000400440116243")),A(new n("DO",28,"U04F20","DO28BAGR00000001212453611324")),A(new n("EE",20,"F02F02F11F01","EE382200221020145685")),A(new n("EG",29,"F04F04F17","EG800002000156789012345180002")),A(new n("ES",24,"F04F04F01F01F10","ES9121000418450200051332")),A(new n("FI",18,"F06F07F01","FI2112345600000785")),A(new n("FO",18,"F04F09F01","FO6264600001631634")),A(new n("FR",27,"F05F05A11F02","FR1420041010050500013M02606")),A(new n("GB",22,"U04F06F08","GB29NWBK60161331926819")),A(new n("GE",22,"U02F16","GE29NB0000000101904917")),A(new n("GI",23,"U04A15","GI75NWBK000000007099453")),A(new n("GL",18,"F04F09F01","GL8964710001000206")),A(new n("GR",27,"F03F04A16","GR1601101250000000012300695")),A(new n("GT",28,"A04A20","GT82TRAJ01020000001210029690")),A(new n("HR",21,"F07F10","HR1210010051863000160")),A(new n("HU",28,"F03F04F01F15F01","HU42117730161111101800000000")),A(new n("IE",22,"U04F06F08","IE29AIBK93115212345678")),A(new n("IL",23,"F03F03F13","IL620108000000099999999")),A(new n("IS",26,"F04F02F06F10","IS140159260076545510730339")),A(new n("IT",27,"U01F05F05A12","IT60X0542811101000000123456")),A(new n("IQ",23,"U04F03A12","IQ98NBIQ850123456789012")),A(new n("JO",30,"A04F22","JO15AAAA1234567890123456789012")),A(new n("KW",30,"U04A22","KW81CBKU0000000000001234560101")),A(new n("KZ",20,"F03A13","KZ86125KZT5004100100")),A(new n("LB",28,"F04A20","LB62099900000001001901229114")),A(new n("LC",32,"U04F24","LC07HEMM000100010012001200013015")),A(new n("LI",21,"F05A12","LI21088100002324013AA")),A(new n("LT",20,"F05F11","LT121000011101001000")),A(new n("LU",20,"F03A13","LU280019400644750000")),A(new n("LV",21,"U04A13","LV80BANK0000435195001")),A(new n("MC",27,"F05F05A11F02","MC5811222000010123456789030")),A(new n("MD",24,"U02A18","MD24AG000225100013104168")),A(new n("ME",22,"F03F13F02","ME25505000012345678951")),A(new n("MK",19,"F03A10F02","MK07250120000058984")),A(new n("MR",27,"F05F05F11F02","MR1300020001010000123456753")),A(new n("MT",31,"U04F05A18","MT84MALT011000012345MTLCAST001S")),A(new n("MU",30,"U04F02F02F12F03U03","MU17BOMM0101101030300200000MUR")),A(new n("NL",18,"U04F10","NL91ABNA0417164300")),A(new n("NO",15,"F04F06F01","NO9386011117947")),A(new n("PK",24,"U04A16","PK36SCBL0000001123456702")),A(new n("PL",28,"F08F16","PL61109010140000071219812874")),A(new n("PS",29,"U04A21","PS92PALS000000000400123456702")),A(new n("PT",25,"F04F04F11F02","PT50000201231234567890154")),A(new n("QA",29,"U04A21","QA30AAAA123456789012345678901")),A(new n("RO",24,"U04A16","RO49AAAA1B31007593840000")),A(new n("RS",22,"F03F13F02","RS35260005601001611379")),A(new n("SA",24,"F02A18","SA0380000000608010167519")),A(new n("SC",31,"U04F04F16U03","SC18SSCB11010000000000001497USD")),A(new n("SE",24,"F03F16F01","SE4550000000058398257466")),A(new n("SI",19,"F05F08F02","SI56263300012039086")),A(new n("SK",24,"F04F06F10","SK3112000000198742637541")),A(new n("SM",27,"U01F05F05A12","SM86U0322509800000000270100")),A(new n("ST",25,"F08F11F02","ST68000100010051845310112")),A(new n("SV",28,"U04F20","SV62CENR00000000000000700025")),A(new n("TL",23,"F03F14F02","TL380080012345678910157")),A(new n("TN",24,"F02F03F13F02","TN5910006035183598478831")),A(new n("TR",26,"F05F01A16","TR330006100519786457841326")),A(new n("UA",29,"F25","UA511234567890123456789012345")),A(new n("VA",22,"F18","VA59001123000012345678")),A(new n("VG",24,"U04F16","VG96VPVG0000012345678901")),A(new n("XK",20,"F04F10F02","XK051212012345678906")),A(new n("AO",25,"F21","AO69123456789012345678901")),A(new n("BF",27,"F23","BF2312345678901234567890123")),A(new n("BI",16,"F12","BI41123456789012")),A(new n("BJ",28,"F24","BJ39123456789012345678901234")),A(new n("CI",28,"U02F22","CI70CI1234567890123456789012")),A(new n("CM",27,"F23","CM9012345678901234567890123")),A(new n("CV",25,"F21","CV30123456789012345678901")),A(new n("DZ",24,"F20","DZ8612345678901234567890")),A(new n("IR",26,"F22","IR861234568790123456789012")),A(new n("MG",27,"F23","MG1812345678901234567890123")),A(new n("ML",28,"U01F23","ML15A12345678901234567890123")),A(new n("MZ",25,"F21","MZ25123456789012345678901")),A(new n("SN",28,"U01F23","SN52A12345678901234567890123")),A(new n("GF",27,"F05F05A11F02","GF121234512345123456789AB13")),A(new n("GP",27,"F05F05A11F02","GP791234512345123456789AB13")),A(new n("MQ",27,"F05F05A11F02","MQ221234512345123456789AB13")),A(new n("RE",27,"F05F05A11F02","RE131234512345123456789AB13")),A(new n("PF",27,"F05F05A11F02","PF281234512345123456789AB13")),A(new n("TF",27,"F05F05A11F02","TF891234512345123456789AB13")),A(new n("YT",27,"F05F05A11F02","YT021234512345123456789AB13")),A(new n("NC",27,"F05F05A11F02","NC551234512345123456789AB13")),A(new n("BL",27,"F05F05A11F02","BL391234512345123456789AB13")),A(new n("MF",27,"F05F05A11F02","MF551234512345123456789AB13")),A(new n("PM",27,"F05F05A11F02","PM071234512345123456789AB13")),A(new n("WF",27,"F05F05A11F02","WF621234512345123456789AB13"));var w=/[^a-zA-Z0-9]/g,i=/(.{4})(?!$)/g,o=function(e){return"string"==typeof e||e instanceof String};exports.countries=r,exports.electronicFormat=t,exports.fromBBAN=function(e,F){var n=r[e];if(!n)throw new Error("No country with code "+e);return n.fromBBAN(t(F))},exports.isValid=function(e){if(!o(e))return!1;e=t(e);var F=r[e.slice(0,2)];return!!F&&F.isValid(e)},exports.isValidBBAN=function(e,F){if(!o(F))return!1;var n=r[e];return null==n?void 0:n.isValidBBAN(t(F))},exports.printFormat=function(e,F){return void 0===F&&(F=" "),t(e).replace(i,"$1"+F)},exports.toBBAN=function(e,F){void 0===F&&(F=" "),e=t(e);var n=r[e.slice(0,2)];if(!n)throw new Error("No country with code "+e.slice(0,2));return n.toBBAN(e,F)};
//# sourceMappingURL=iban-ts.cjs.production.min.js.map

@@ -15,2 +15,6 @@ var A = /*#__PURE__*/'A'.charCodeAt(0);

function Specification(countryCode, length, structure, example) {
this.countryCode = void 0;
this.length = void 0;
this.structure = void 0;
this.example = void 0;
this._cachedRegex = null;

@@ -17,0 +21,0 @@ this.countryCode = countryCode;

{
"name": "iban-ts",
"version": "0.1.1",
"version": "0.2.0",
"description": "A javascript library to validate, format and convert IBAN (International Bank Account Number) and BBAN (Basic Bank Account Number)",
"license": "MIT",
"main": "dist/index.js",
"main": "./dist/index.js",
"module": "./dist/iban-ts.esm.js",
"exports": {
".": {
"import": "./dist/iban-ts.esm.js",
"require": "./dist/index.js"
}
},
"typings": "dist/index.d.ts",

@@ -13,19 +20,13 @@ "files": [

"engines": {
"node": ">=10"
"node": ">=14"
},
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test",
"lint": "tsdx lint",
"prepare": "tsdx build",
"analyze": "size-limit --why",
"build": "dts build",
"lint": "dts lint",
"prepare": "dts build",
"size": "size-limit",
"analyze": "size-limit --why"
"start": "dts watch",
"test": "dts test"
},
"peerDependencies": {},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
}
},
"prettier": {

@@ -39,3 +40,2 @@ "printWidth": 120,

"repository": "https://github.com/altrim/iban.js",
"module": "dist/iban.esm.js",
"size-limit": [

@@ -52,9 +52,9 @@ {

"devDependencies": {
"@size-limit/preset-small-lib": "^4.9.2",
"husky": "^5.0.9",
"size-limit": "^4.9.2",
"tsdx": "^0.14.1",
"tslib": "^2.1.0",
"typescript": "^4.1.5"
"@size-limit/preset-small-lib": "7.0.8",
"@tsconfig/recommended": "1.0.1",
"dts-cli": "1.2.0",
"size-limit": "7.0.8",
"tslib": "2.3.1",
"typescript": "4.5.5"
}
}

@@ -50,6 +50,3 @@ const A = 'A'.charCodeAt(0);

toBBAN(iban: string, separator: string): string | undefined {
return this._regex()
?.exec(iban.slice(4))
?.slice(1)
.join(separator);
return this._regex()?.exec(iban.slice(4))?.slice(1).join(separator);
}

@@ -108,3 +105,3 @@

.split('')
.map(function(n) {
.map(function (n) {
const code = n.charCodeAt(0);

@@ -132,3 +129,3 @@ if (code >= A && code <= Z) {

// split in blocks of 3 chars
const regex = structure.match(/(.{3})/g)?.map(function(block) {
const regex = structure.match(/(.{3})/g)?.map(function (block) {
// parse each structure block (1-char + 2-digits)

@@ -135,0 +132,0 @@ let format;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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