11/**
2- * Copyright 2015-2020 NETCAT (www.netcat.pl)
2+ * Copyright 2015-2022 NETCAT (www.netcat.pl)
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1414 * limitations under the License.
1515 *
1616 * @author NETCAT <firma@netcat.pl>
17- * @copyright 2015-2020 NETCAT (www.netcat.pl)
17+ * @copyright 2015-2022 NETCAT (www.netcat.pl)
1818 * @license http://www.apache.org/licenses/LICENSE-2.0
1919 */
2020
@@ -52,7 +52,7 @@ function isValid(iban)
5252 return false ;
5353 }
5454
55- var map = {
55+ const map = {
5656 'AD' : / ^ A D \\ d { 10 } [ A - Z 0 - 9 ] { 12 } $ / ,
5757 'AE' : / ^ A E \\ d { 21 } $ / ,
5858 'AL' : / ^ A L \\ d { 10 } [ A - Z 0 - 9 ] { 16 } $ / ,
@@ -130,7 +130,7 @@ function isValid(iban)
130130 'XK' : / ^ X K \\ d { 18 } $ /
131131 } ;
132132
133- var cc = iban . substr ( 0 , 2 ) ;
133+ const cc = iban . substr ( 0 , 2 ) ;
134134
135135 if ( ! ( cc in map ) ) {
136136 return false ;
@@ -142,10 +142,10 @@ function isValid(iban)
142142
143143 iban = iban . substr ( 4 ) + iban . substr ( 0 , 4 ) ;
144144
145- var sb = '' ;
145+ let sb = '' ;
146146
147- for ( var i = 0 ; i < iban . length ; i ++ ) {
148- var ord = iban . charCodeAt ( i ) ;
147+ for ( let i = 0 ; i < iban . length ; i ++ ) {
148+ const ord = iban . charCodeAt ( i ) ;
149149
150150 if ( ord >= 65 && ord <= 90 ) {
151151 sb += ( ord - 55 ) ;
0 commit comments