Socket
Socket
Sign inDemoInstall

clabe-validator

Package Overview
Dependencies
0
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.6 to 1.1.0

224

clabe.js

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

// CLABE Validator v1.0.6
// CLABE Validator v1.1.0
// github.com/center-key/clabe-validator

@@ -7,3 +7,3 @@ // MIT License

version: '1.0.6',
version: '1.1.0',

@@ -28,2 +28,3 @@ calcChecksum: function(clabeNum) {

var cityCode = clabeNum.substr(3, 3);
var account = clabeNum.substr(6, 11);
var checksum = parseInt(clabeNum.substr(17, 1));

@@ -38,3 +39,3 @@ function makeCitiesMap() {

makeCitiesMap();
var bank = clabe.banksMap[parseInt(bankCode)];
var bank = clabe.banksMap[parseInt(bankCode)] || {};
var city = clabe.citiesMap[parseInt(cityCode)];

@@ -47,3 +48,3 @@ function calcChecksum() { return clabe.calcChecksum(clabeNum); }

calcChecksum() !== checksum ? 'Invalid checksum, last digit should be: ' + calcChecksum() :
!bank ? 'Invalid bank code' :
!bank.tag ? 'Invalid bank code' :
!city ? 'Invalid city code' :

@@ -55,6 +56,10 @@ false

return {
ok: !error,
error: !!error,
message: error || 'Valid: ' + bank + ' (' + city + ')',
bank: bank,
city: city
message: error || 'Valid: ' + bank.name + ' (' + city + ')',
tag: bank.tag,
bank: bank.name,
city: city,
account: account,
code: { bank: bankCode, city: cityCode }
};

@@ -74,103 +79,104 @@ },

banksMap: { //source: https://es.wikipedia.org/wiki/CLABE#C.C3.B3digo_de_banco (Jan 9, 2017)
2: 'Banco Nacional de México',
6: 'Banco Nacional de Comercio Exterior',
9: 'Banco Nacional de Obras y Servicios Públicos',
12: 'BBVA Bancomer',
14: 'Banco Santander',
19: 'Banco Nacional del Ejército',
21: 'HSBC México',
22: 'GE Money Bank',
30: 'Banco del Bajío',
32: 'IXE Banco',
36: 'Banco Inbursa',
37: 'Banco Interacciones',
42: 'Banca Mifel',
44: 'Scotiabank Inverlat',
58: 'Banco Regional de Monterrey',
59: 'Banco Invex',
60: 'Bansi',
62: 'Banca Afirme',
72: 'Banco Mercantil del Norte',
102: 'ABN AMRO Bank México',
103: 'American Express Bank (México)',
106: 'Bank of America México',
108: 'Bank of Tokyo-Mitsubishi UFJ (México)',
110: 'Banco J.P. Morgan',
112: 'Banco Monex',
113: 'Banco Ve por Mas',
116: 'ING Bank (México)',
124: 'Deutsche Bank México',
126: 'Banco Credit Suisse (México)',
127: 'Banco Azteca',
128: 'Banco Autofin México',
129: 'Barclays Bank México',
130: 'Banco Compartamos',
131: 'Banco Ahorro Famsa',
132: 'Banco Multiva',
133: 'Prudencial Bank',
134: 'Banco Wal Mart de México Adelante',
135: 'Nacional Financiera',
136: 'Banco Regional',
137: 'BanCoppel',
138: 'Banco Amigo',
139: 'UBS Banco',
140: 'Banco Fácil',
141: 'Volkswagen Bank',
143: 'Consultoría Internacional Banco',
145: 'Banco BASE de I.B.M.',
147: 'Bankaool, Institución de Banca Múltiple',
150: 'Banco Inmobiliario Mexicano',
156: 'Banco Sabadell, S.A. I.B.M.',
166: 'Banco del Ahorro Nacional y Servicios Financieros',
168: 'Sociedad Hipotecaria Federal',
600: 'Monex Casa de Bolsa',
601: 'GBM Grupo Bursátil Mexicano',
602: 'Masari Casa de Cambio',
604: 'Inversora Bursátil',
605: 'Valué, Casa de Bolsa',
606: 'Base Internacional Casa de Bolsa',
607: 'Casa de Cambio Tiber',
608: 'Vector Casa de Bolsa',
610: 'B y B Casa de Cambio',
611: 'Intercam Casa de Cambio',
613: 'Multivalores Casa de Bolsa Multiva Gpo. Fin.',
614: 'Acciones y Valores Banamex',
615: 'Merrill Lynch México',
616: 'Casa de Bolsa Finamex',
617: 'Valores Mexicanos',
618: 'Única Casa de Cambio',
619: 'MAPFRE Tepeyac',
620: 'Profuturo G.N.P.',
621: 'Actinver Casa de Bolsa',
622: 'Actinver',
623: 'Skandia Vida',
624: 'Consultoría Internacional Casa de Cambio',
626: 'Deutsche Securities, S.A. de C.V.',
627: 'Zurich Compañía de Seguros',
628: 'Zurich Vida, Compañía de Seguros',
629: 'Hipotecaria su Casita',
630: 'Intercam Casa de Bolsa',
631: 'Vanguardia Casa de Bolsa',
632: 'Bulltick Casa de Bolsa',
633: 'Sterling Casa de Cambio',
634: 'Fincomún, Servicios Financieros Comunitarios',
636: 'HDI Seguros, S.A. de C.V.',
637: 'OrderExpress Casa de Cambio AAC',
638: 'Akala, Sociedad Financiera Popular',
640: 'J.P. Morgan Casa de Bolsa',
642: 'Operadora de Recursos Reforma, S.A. de C.V.',
646: 'Sistema de Transferencias y Pagos STP',
647: 'Telecomunicaciones de México',
648: 'Evercore Casa de Bolsa, S.A. de C.V.',
649: 'Skandia Operadora',
651: 'Seguros Monterrey New York Life, S.A de C.V.',
652: 'Solución Asea, S.A. de C.V., Sociedad Financiera Popular',
653: 'Kuspit Casa de Bolsa, S.A. de C.V.',
655: 'J.P. SOFIEXPRESS, S.A. de C.V., S.F.P.',
656: 'UNAGRA, S.A. de C.V., S.F.P.',
659: 'Opciones Empresariales Del Noreste, S.A. DE C.V.',
670: 'Libertad Servicios Financieros, S.A. De C.V.',
901: 'CLS Bank International',
902: 'SD. INDEVAL',
999: 'N/A'
2: { tag: 'BANAMEX', name: 'Banco Nacional de México, S.A.' },
6: { tag: 'BANCOMEXT', name: 'Banco Nacional de Comercio Exterior' },
9: { tag: 'BANOBRAS', name: 'Banco Nacional de Obras y Servicios Públicos' },
12: { tag: 'BBVA BANCOMER', name: 'BBVA Bancomer, S.A.' },
14: { tag: 'SANTANDER', name: 'Banco Santander, S.A.' },
19: { tag: 'BANJERCITO', name: 'Banco Nacional del Ejército, Fuerza Aérea y Armada' },
21: { tag: 'HSBC', name: 'HSBC México, S.A.' },
22: { tag: 'GE MONEY', name: 'GE Money Bank, S.A.' },
30: { tag: 'BAJÍO', name: 'Banco del Bajío, S.A.' },
32: { tag: 'IXE', name: 'IXE Banco, S.A.' },
36: { tag: 'INBURSA', name: 'Banco Inbursa, S.A.' },
37: { tag: 'INTERACCIONES', name: 'Banco Interacciones, S.A.' },
42: { tag: 'MIFEL', name: 'Banca Mifel, S.A.' },
44: { tag: 'SCOTIABANK', name: 'Scotiabank Inverlat, S.A.' },
58: { tag: 'BANREGIO', name: 'Banco Regional de Monterrey, S.A.' },
59: { tag: 'INVEX', name: 'Banco Invex, S.A.' },
60: { tag: 'BANSI', name: 'Bansi, S.A.' },
62: { tag: 'AFIRME', name: 'Banca Afirme, S.A.' },
72: { tag: 'BANORTE', name: 'Banco Mercantil del Norte, S.A.' },
102: { tag: 'ABNAMRO', name: 'ABN AMRO Bank México, S.A.' },
103: { tag: 'AMERICAN EXPRESS', name: 'American Express Bank (México), S.A.' },
106: { tag: 'BAMSA', name: 'Bank of America México, S.A.' },
108: { tag: 'TOKYO', name: 'Bank of Tokyo-Mitsubishi UFJ (México), S.A.' },
110: { tag: 'JP MORGAN', name: 'Banco J.P. Morgan, S.A.' },
112: { tag: 'BMONEX', name: 'Banco Monex, S.A.' },
113: { tag: 'VE POR MAS', name: 'Banco Ve por Mas, S.A.' },
116: { tag: 'ING', name: 'ING Bank (México), S.A.' },
124: { tag: 'DEUTSCHE', name: 'Deutsche Bank México, S.A.' },
126: { tag: 'CREDIT SUISSE', name: 'Banco Credit Suisse (México), S.A.' },
127: { tag: 'AZTECA', name: 'Banco Azteca, S.A.' },
128: { tag: 'AUTOFIN', name: 'Banco Autofin México, S.A.' },
129: { tag: 'BARCLAYS', name: 'Barclays Bank México, S.A.' },
130: { tag: 'COMPARTAMOS', name: 'Banco Compartamos, S.A.' },
131: { tag: 'FAMSA', name: 'Banco Ahorro Famsa, S.A.' },
132: { tag: 'BMULTIVA', name: 'Banco Multiva, S.A.' },
133: { tag: 'PRUDENTIAL', name: 'Prudencial Bank, S.A.' },
134: { tag: 'WAL-MART', name: 'Banco Wal Mart de México Adelante, S.A.' },
135: { tag: 'NAFIN', name: 'Nacional Financiera, S.N.C.' },
136: { tag: 'REGIONAL', name: 'Banco Regional, S.A.' },
137: { tag: 'BANCOPPEL', name: 'BanCoppel, S.A.' },
138: { tag: 'ABC CAPITAL', name: 'ABC Capital, S.A. I.B.M.' },
139: { tag: 'UBS BANK', name: 'UBS Banco, S.A.' },
140: { tag: 'FÁCIL', name: 'Banco Fácil, S.A.' },
141: { tag: 'VOLKSWAGEN', name: 'Volkswagen Bank S.A. Institución de Banca Múltiple' },
143: { tag: 'CIBanco', name: 'Consultoría Internacional Banco, S.A.' },
145: { tag: 'BBASE', name: 'Banco BASE, S.A. de I.B.M.' },
147: { tag: 'BANKAOOL', name: 'Bankaool, S.A., Institución de Banca Múltiple' },
148: { tag: 'PagaTodo', name: 'Banco PagaTodo S.A., Institución de Banca Múltiple' },
150: { tag: 'BIM', name: 'Banco Inmobiliario Mexicano, S.A., Institución de Banca Múltiple' },
156: { tag: 'SABADELL', name: 'Banco Sabadell, S.A. I.B.M.' },
166: { tag: 'BANSEFI', name: 'Banco del Ahorro Nacional y Servicios Financieros, S.N.C.' },
168: { tag: 'HIPOTECARIA FEDERAL', name: 'Sociedad Hipotecaria Federal, S.N.C.' },
600: { tag: 'MONEXCB', name: 'Monex Casa de Bolsa, S.A. de C.V.' },
601: { tag: 'GBM', name: 'GBM Grupo Bursátil Mexicano, S.A. de C.V.' },
602: { tag: 'MASARI CC.', name: 'Masari Casa de Cambio, S.A. de C.V.' },
604: { tag: 'C.B. INBURSA', name: 'Inversora Bursátil, S.A. de C.V.' },
605: { tag: 'VALUÉ', name: 'Valué, S.A. de C.V., Casa de Bolsa' },
606: { tag: 'CB BASE', name: 'Base Internacional Casa de Bolsa, S.A. de C.V.' },
607: { tag: 'TIBER', name: 'Casa de Cambio Tiber, S.A. de C.V.' },
608: { tag: 'VECTOR', name: 'Vector Casa de Bolsa, S.A. de C.V.' },
610: { tag: 'B&B', name: 'B y B Casa de Cambio, S.A. de C.V.' },
611: { tag: 'INTERCAM', name: 'Intercam Casa de Cambio, S.A. de C.V.' },
613: { tag: 'MULTIVA', name: 'Multivalores Casa de Bolsa, S.A. de C.V. Multiva Gpo. Fin.' },
614: { tag: 'ACCIVAL', name: 'Acciones y Valores Banamex, S.A. de C.V., Casa de Bolsa' },
615: { tag: 'MERRILL LYNCH', name: 'Merrill Lynch México, S.A. de C.V., Casa de Bolsa' },
616: { tag: 'FINAMEX', name: 'Casa de Bolsa Finamex, S.A. de C.V.' },
617: { tag: 'VALMEX', name: 'Valores Mexicanos Casa de Bolsa, S.A. de C.V.' },
618: { tag: 'ÚNICA', name: 'Única Casa de Cambio, S.A. de C.V.' },
619: { tag: 'ASEGURADORA MAPFRE', name: 'MAPFRE Tepeyac S.A.' },
620: { tag: 'AFORE PROFUTURO', name: 'Profuturo G.N.P., S.A. de C.V.' },
621: { tag: 'CB ACTINBER', name: 'Actinver Casa de Bolsa, S.A. de C.V.' },
622: { tag: 'ACTINVE SI', name: 'Actinver S.A. de C.V.' },
623: { tag: 'SKANDIA', name: 'Skandia Vida S.A. de C.V.' },
624: { tag: 'CONSULTORÍA', name: 'Consultoría Internacional Casa de Cambio, S.A. de C.V.' },
626: { tag: 'CBDEUTSCHE', name: 'Deutsche Securities, S.A. de C.V.' },
627: { tag: 'ZURICH', name: 'Zurich Compañía de Seguros, S.A.' },
628: { tag: 'ZURICHVI', name: 'Zurich Vida, Compañía de Seguros, S.A.' },
629: { tag: 'HIPOTECARIA SU CASITA', name: 'Hipotecaria su Casita, S.A. de C.V.' },
630: { tag: 'C.B. INTERCAM', name: 'Intercam Casa de Bolsa, S.A. de C.V.' },
631: { tag: 'C.B. VANGUARDIA', name: 'Vanguardia Casa de Bolsa, S.A. de C.V.' },
632: { tag: 'BULLTICK C.B.', name: 'Bulltick Casa de Bolsa, S.A. de C.V.' },
633: { tag: 'STERLING', name: 'Sterling Casa de Cambio, S.A. de C.V.' },
634: { tag: 'FINCOMUN', name: 'Fincomún, Servicios Financieros Comunitarios, S.A. de C.V.' },
636: { tag: 'HDI SEGUROS', name: 'HDI Seguros, S.A. de C.V.' },
637: { tag: 'ORDER', name: 'OrderExpress Casa de Cambio , S.A. de C.V. AAC' },
638: { tag: 'AKALA', name: 'Akala, S.A. de C.V., Sociedad Financiera Popular' },
640: { tag: 'JP MORGAN C.B.', name: 'J.P. Morgan Casa de Bolsa, S.A. de C.V.' },
642: { tag: 'REFORMA', name: 'Operadora de Recursos Reforma, S.A. de C.V.' },
646: { tag: 'STP', name: 'Sistema de Transferencias y Pagos STP, S.A. de C.V., SOFOM E.N.R.' },
647: { tag: 'TELECOMM', name: 'Telecomunicaciones de México' },
648: { tag: 'EVERCORE', name: 'Evercore Casa de Bolsa, S.A. de C.V.' },
649: { tag: 'SKANDIA', name: 'Skandia Operadora S.A. de C.V.' },
651: { tag: 'SEGMTY', name: 'Seguros Monterrey New York Life, S.A de C.V.' },
652: { tag: 'ASEA', name: 'Solución Asea, S.A. de C.V., Sociedad Financiera Popular' },
653: { tag: 'KUSPIT', name: 'Kuspit Casa de Bolsa, S.A. de C.V.' },
655: { tag: 'SOFIEXPRESS', name: 'J.P. SOFIEXPRESS, S.A. de C.V., S.F.P.' },
656: { tag: 'UNAGRA', name: 'UNAGRA, S.A. de C.V., S.F.P.' },
659: { tag: 'OPCIONES EMPRESARIALES DEL NOROESTE', name: 'Opciones Empresariales Del Noreste, S.A. DE C.V.' },
670: { tag: 'LIBERTAD', name: 'Libertad Servicios Financieros, S.A. De C.V.' },
901: { tag: 'CLS', name: 'CLS Bank International' },
902: { tag: 'INDEVAL', name: 'SD. INDEVAL, S.A. de C.V.' },
999: { tag: 'N/A', name: 'N/A' }
},

@@ -651,1 +657,3 @@

module.exports = clabe; //Node.js module loading system (CommonJS)
if (typeof window === 'object')
window.clabe = clabe; //support both global and window property

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

//! CLABE Validator v1.0.6 ~ github.com/center-key/clabe-validator ~ MIT License
var clabe={version:"1.0.6",calcChecksum:function(a){var o=0;return a.split("").slice(0,17).forEach(function(a,e){o+=parseInt(a)*[3,7,1][e%3]%10}),(10-o%10)%10},validate:function(a){if("string"!=typeof a)throw"clabe.validator.check(clabeNum) -- Expected string, got: "+typeof a;var e=a.substr(0,3),o=a.substr(3,3),n=parseInt(a.substr(17,1));clabe.citiesMap||(clabe.citiesMap={},clabe.cities.forEach(function(a){var e;clabe.citiesMap[a[0]]=(e=a[0],(clabe.citiesMap[e]?clabe.citiesMap[e]+", ":"")+a[1])}));var l=clabe.banksMap[parseInt(e)],i=clabe.citiesMap[parseInt(o)];function c(){return clabe.calcChecksum(a)}var r=18!==a.length?"Must be exactly 18 digits long":/[0-9]{18}/.test(a)?c()!==n?"Invalid checksum, last digit should be: "+c():l?!i&&"Invalid city code":"Invalid bank code":"Must be only numeric digits (no letters)";return{error:!!r,message:r||"Valid: "+l+" ("+i+")",bank:l,city:i}},calculate:function(a,e,o){function n(a,e){return function a(e,o){return e.length<o?a("0"+e,o):e}(""+a,e).slice(-e)}var l=n(a,3)+n(e,3)+n(o,11);return l+clabe.calcChecksum(l)},banksMap:{2:"Banco Nacional de México",6:"Banco Nacional de Comercio Exterior",9:"Banco Nacional de Obras y Servicios Públicos",12:"BBVA Bancomer",14:"Banco Santander",19:"Banco Nacional del Ejército",21:"HSBC México",22:"GE Money Bank",30:"Banco del Bajío",32:"IXE Banco",36:"Banco Inbursa",37:"Banco Interacciones",42:"Banca Mifel",44:"Scotiabank Inverlat",58:"Banco Regional de Monterrey",59:"Banco Invex",60:"Bansi",62:"Banca Afirme",72:"Banco Mercantil del Norte",102:"ABN AMRO Bank México",103:"American Express Bank (México)",106:"Bank of America México",108:"Bank of Tokyo-Mitsubishi UFJ (México)",110:"Banco J.P. Morgan",112:"Banco Monex",113:"Banco Ve por Mas",116:"ING Bank (México)",124:"Deutsche Bank México",126:"Banco Credit Suisse (México)",127:"Banco Azteca",128:"Banco Autofin México",129:"Barclays Bank México",130:"Banco Compartamos",131:"Banco Ahorro Famsa",132:"Banco Multiva",133:"Prudencial Bank",134:"Banco Wal Mart de México Adelante",135:"Nacional Financiera",136:"Banco Regional",137:"BanCoppel",138:"Banco Amigo",139:"UBS Banco",140:"Banco Fácil",141:"Volkswagen Bank",143:"Consultoría Internacional Banco",145:"Banco BASE de I.B.M.",147:"Bankaool, Institución de Banca Múltiple",150:"Banco Inmobiliario Mexicano",156:"Banco Sabadell, S.A. I.B.M.",166:"Banco del Ahorro Nacional y Servicios Financieros",168:"Sociedad Hipotecaria Federal",600:"Monex Casa de Bolsa",601:"GBM Grupo Bursátil Mexicano",602:"Masari Casa de Cambio",604:"Inversora Bursátil",605:"Valué, Casa de Bolsa",606:"Base Internacional Casa de Bolsa",607:"Casa de Cambio Tiber",608:"Vector Casa de Bolsa",610:"B y B Casa de Cambio",611:"Intercam Casa de Cambio",613:"Multivalores Casa de Bolsa Multiva Gpo. Fin.",614:"Acciones y Valores Banamex",615:"Merrill Lynch México",616:"Casa de Bolsa Finamex",617:"Valores Mexicanos",618:"Única Casa de Cambio",619:"MAPFRE Tepeyac",620:"Profuturo G.N.P.",621:"Actinver Casa de Bolsa",622:"Actinver",623:"Skandia Vida",624:"Consultoría Internacional Casa de Cambio",626:"Deutsche Securities, S.A. de C.V.",627:"Zurich Compañía de Seguros",628:"Zurich Vida, Compañía de Seguros",629:"Hipotecaria su Casita",630:"Intercam Casa de Bolsa",631:"Vanguardia Casa de Bolsa",632:"Bulltick Casa de Bolsa",633:"Sterling Casa de Cambio",634:"Fincomún, Servicios Financieros Comunitarios",636:"HDI Seguros, S.A. de C.V.",637:"OrderExpress Casa de Cambio AAC",638:"Akala, Sociedad Financiera Popular",640:"J.P. Morgan Casa de Bolsa",642:"Operadora de Recursos Reforma, S.A. de C.V.",646:"Sistema de Transferencias y Pagos STP",647:"Telecomunicaciones de México",648:"Evercore Casa de Bolsa, S.A. de C.V.",649:"Skandia Operadora",651:"Seguros Monterrey New York Life, S.A de C.V.",652:"Solución Asea, S.A. de C.V., Sociedad Financiera Popular",653:"Kuspit Casa de Bolsa, S.A. de C.V.",655:"J.P. SOFIEXPRESS, S.A. de C.V., S.F.P.",656:"UNAGRA, S.A. de C.V., S.F.P.",659:"Opciones Empresariales Del Noreste, S.A. DE C.V.",670:"Libertad Servicios Financieros, S.A. De C.V.",901:"CLS Bank International",902:"SD. INDEVAL",999:"N/A"},cities:[[10,"Aguascalientes"],[12,"Calvillo"],[14,"Jesús María"],[20,"Mexicali"],[22,"Ensenada"],[27,"Tecate"],[27,"Tijuana"],[28,"La Mesa"],[28,"Rosarito"],[28,"Tijuana [alternate]"],[40,"La Paz"],[41,"Cabo San Lucas"],[42,"Ciudad Constitución"],[43,"Guerrero Negro"],[45,"San José del Cabo"],[46,"Santa Rosalía"],[50,"Campeche"],[51,"Calkiní"],[52,"Ciudad del Carmen"],[53,"Champotón"],[60,"Gómez Palacio"],[60,"Torreón"],[62,"Ciudad Acuña"],[68,"Monclova"],[71,"Nava"],[72,"Nueva Rosita"],[74,"Parras de la Fuente"],[75,"Piedras Negras"],[76,"Ramos Arizpe"],[77,"Sabinas"],[78,"Saltillo"],[80,"San Pedro de las Colonias"],[90,"Colima"],[95,"Manzanillo"],[97,"Tecomán"],[100,"Terán"],[100,"Tuxtla Gutiérrez"],[103,"Arriaga"],[107,"Cintalapa"],[109,"Comitán"],[109,"Villa Las Rosas"],[111,"Chiapa de Corso"],[113,"F. Comalapa"],[114,"Huixtla"],[123,"Ocosingo"],[124,"Ocozocuautla"],[125,"Palenque"],[126,"Pichucalco"],[127,"Pijijiapan"],[128,"Reforma"],[130,"San Cristóbal de las Casas"],[131,"Simojovel"],[133,"Tapachula"],[135,"Tonala"],[137,"Venustiano Carranza"],[138,"Villa Flores"],[140,"Yajalón"],[150,"Chihuahua"],[150,"Ciudad Delicias"],[152,"Ciudad Anáhuac"],[155,"Ciudad Camargo"],[158,"Ciudad Cuauhtémoc"],[161,"Ciudad Guerrero"],[162,"Parral"],[163,"Ciudad Jiménez"],[164,"Ciudad Juárez"],[165,"Ciudad Madera"],[167,"El Molino de Namiquipa"],[168,"Nuevo Casas Grandes"],[180,"Atizapan"],[180,"Chalco"],[180,"Ciudad de México"],[180,"Coacalco"],[180,"Cuautitlán Izcalli"],[180,"Cuautitlán"],[180,"Ecatepec"],[180,"Huehuetoca"],[180,"Huixquilucan"],[180,"Ixtapaluca"],[180,"Los Reyes La Paz"],[180,"Naucalpan"],[180,"Nezahualcóyotl"],[180,"Tecamac"],[180,"Teotihuacán"],[180,"Texcoco"],[180,"Tlalnepantla"],[190,"Durango"],[198,"N/A"],[201,"Tepehuanes"],[202,"Vicente Guerrero"],[210,"Guanajuato"],[211,"Abasolo"],[212,"Acámbaro"],[213,"Apaseo el Alto"],[214,"Apaseo el Grande"],[215,"Celaya"],[216,"Comonfort"],[217,"Coroneo"],[218,"Cortazar"],[219,"Cuerámaro"],[220,"Dolores Hidalgo"],[222,"Irapuato"],[223,"Jaral del Progreso"],[224,"Jerécuaro"],[225,"León"],[226,"Cd. Manuel Doblado"],[227,"Moroleón"],[229,"Pénjamo"],[232,"Romita"],[233,"Salamanca"],[234,"Salvatierra"],[236,"San Felipe"],[237,"Purísima de Bustos"],[237,"San Francisco del Rincoón"],[238,"San José Iturbide"],[239,"San Luis de la Paz"],[240,"San Miguel Allende"],[244,"Silao"],[247,"Uriangato"],[248,"Valle de Santiago"],[249,"Yuriria"],[260,"Chilpancingo"],[261,"Acapulco"],[263,"Arcelia"],[264,"Atoyac de Álvarez"],[266,"Ciudad Altamirano"],[267,"Coyuca de Benítez"],[270,"Chilapa"],[271,"Huitzuco"],[272,"Iguala"],[272,"La Sabana"],[274,"Cuajinicuilapa"],[274,"Ometepec"],[275,"San Marcos"],[276,"Taxco"],[278,"Teloloapan"],[281,"Tlapa"],[282,"Ixtapa Zihuatanejo"],[282,"Zihuatanejo"],[290,"Pachuca"],[291,"Actopan"],[292,"Apam"],[293,"Atotonilco el Grande"],[294,"Ciudad Sahagún"],[294,"Teocaltiche"],[295,"Cuautepec"],[296,"Huejutla"],[297,"Huichapan"],[298,"Ixmiquilpan"],[303,"Progreso de Obregón"],[305,"Tepeapulco"],[308,"Tizayuca"],[311,"Tula de Allende"],[312,"Tulancingo"],[313,"Zacualtipán"],[314,"Zimapán"],[320,"El Salto"],[320,"Guadalajara"],[320,"San Pedro Tlaquepaque"],[320,"Tlajomulco"],[320,"Tonala [alternate]"],[320,"Zapopan"],[326,"Ameca"],[327,"Arandas"],[330,"Atotonilco el Alto"],[331,"Atequiza"],[333,"Autlán"],[334,"Azteca"],[340,"Casimiro Castillo"],[341,"Cihuatlán"],[342,"Ciudad Guzmán"],[346,"Chapala"],[348,"El Grullo"],[355,"Ixtlahuacán del Río"],[356,"Jalostotitlán"],[357,"Jamay"],[361,"La Barca"],[362,"Lagos de Moreno"],[370,"Ocotlán"],[373,"Pihuamo"],[375,"Las Juntas"],[375,"Nuevo Vallarta"],[375,"Pitillal"],[375,"Puerto Vallarta"],[381,"San Juan de los Lagos"],[382,"N/A"],[384,"San Miguel el Alto"],[385,"San Patricio Melaque"],[386,"Sayula"],[387,"Tala"],[389,"Tamazula de Gordiano"],[391,"Tecalitlán"],[396,"Tepatitlán"],[397,"Tequila"],[403,"Tototlán"],[404,"Túxpam"],[411,"Villa Hidalgo"],[413,"Zacoalco de Torres"],[414,"Zapotiltic"],[416,"Zapotlanejo"],[420,"Toluca"],[421,"Acambay"],[422,"Almoloya de Juárez"],[424,"Amecameca"],[425,"Apaxco"],[426,"Atlacomulco"],[428,"Coatepec de Harinas"],[430,"Chicoloapan"],[431,"Chiconcuac"],[432,"El Oro"],[433,"Ixtapan de la Sal"],[434,"Ixtlahuaca"],[435,"Jilotepec"],[438,"Lerma"],[441,"Metepec"],[443,"Otumba"],[445,"San Mateo Atenco"],[446,"Tejupilco"],[448,"Temascaltepec"],[449,"Temoaya"],[450,"Tenancingo"],[451,"Tenago del Valle"],[453,"Santiago Tiangistenco"],[455,"Tultepec"],[456,"Tultitlán"],[457,"Valle de Bravo"],[460,"Villa Nicolás Romero"],[463,"Zumpango"],[470,"Morelia"],[472,"Aguililla"],[476,"Apatzingán"],[480,"Ciudad Hidalgo"],[483,"Cotija"],[484,"Cuitzeo"],[492,"Huetamo"],[493,"Jacona"],[494,"Jiquilpan"],[496,"La Piedad"],[497,"Lázaro Cárdenas"],[498,"Los Reyes"],[499,"Maravatío"],[501,"Nueva Italia"],[506,"Pátzcuaro"],[508,"Purépero"],[509,"Puruandiro"],[512,"Sahuayo"],[515,"Tacámbaro"],[517,"Tangancícuaro"],[519,"Tepalcatepec"],[523,"Tlazazalca"],[528,"Uruapan"],[533,"Yurécuaro"],[534,"Zacapu"],[535,"Zamora"],[536,"Zinapécuaro"],[537,"Zitácuaro"],[540,"Cuernavaca"],[542,"Cuautla"],[542,"Oaxtepec, Morelos"],[543,"Jiutepec"],[544,"Jojutla"],[545,"Puente de Ixtla"],[546,"Temixco"],[548,"Tetecala"],[549,"Yautepec"],[552,"Zacatepec"],[560,"Tepic"],[561,"Acaponeta"],[562,"Ahuacatlán"],[564,"Compostela"],[566,"Ixtlán del Río"],[571,"San Blas"],[573,"Santiago Ixcuintla"],[575,"Túxpam [alternate]"],[580,"Apodaca"],[580,"Cadereyta"],[580,"Cd. Guadalupe"],[580,"General Escobedo"],[580,"Monterrey"],[580,"San Nicolás de los Garza"],[580,"San Pedro Garza García"],[580,"Santa Catarina"],[583,"Allende"],[592,"General Zuazua"],[595,"Linares"],[597,"Montemorelos"],[599,"Sabinas Hidalgo"],[600,"Salinas Victoria"],[601,"El Cercado"],[601,"Villa de Santiago"],[610,"Oaxaca"],[613,"Tlaxiaco"],[614,"Huajuapan de León"],[616,"Ixtepec"],[617,"Juchitán"],[619,"Loma Bonita"],[620,"Matías Romero"],[621,"Miahuatlán"],[622,"Ocotlán [alternate]"],[624,"Puerto Escondido"],[626,"Salina Cruz"],[627,"Lagunas"],[628,"Tuxtepec"],[630,"Pochutla"],[631,"San Pedro Tapanatepec"],[632,"Santa Lucía del Camino"],[634,"Bahías de Huatulco"],[635,"Santiago Juxtlahuaca"],[636,"Pinotepa Nacional"],[637,"Tehuantepec"],[638,"Tlacolula"],[640,"Zimatlán"],[650,"Cholula"],[650,"La Resurrección"],[650,"Puebla"],[650,"San Baltazar Campeche"],[651,"N/A"],[652,"Acatzingo"],[654,"Atlixco"],[656,"Cuetzalan"],[659,"Huauchinango"],[662,"Izúcar de Matamoros"],[667,"San Martín Texmelucan"],[668,"San Felipe Hueyotlipan"],[669,"Tecamachalco"],[670,"Tehuacán"],[671,"San Lorenzo"],[672,"Teziutlán"],[674,"Xicotepec de Juárez"],[676,"Zacatlán"],[680,"Pedro Escobedo"],[680,"Querétaro"],[680,"Villa Corregidora"],[681,"Amealco"],[685,"San Juan del Río"],[686,"Tequisquiapan"],[690,"Chetumal"],[691,"Cancún"],[691,"Col. Puerto Juárez"],[692,"Cozumel"],[693,"N/A"],[694,"Playa del Carmen"],[700,"San Luis Potosí"],[703,"Cerritos"],[705,"Ciudad Valles"],[709,"Matehuala"],[711,"Río Verde"],[716,"Tamuín"],[730,"Culiacán"],[735,"Concordia"],[736,"Cosala"],[737,"Choix"],[738,"El Fuerte"],[739,"Escuinapa"],[740,"Guamúchil"],[741,"Guasave"],[743,"Los Mochis"],[743,"Topolobampo"],[744,"Mazatlán"],[745,"Mocorito"],[746,"Navolato"],[760,"Hermosillo"],[761,"Agua Prieta"],[765,"Caborca"],[766,"Cananea"],[767,"Ciudad Obregón"],[767,"Esperanza"],[769,"Empalme"],[770,"Guaymas"],[770,"San Carlos"],[771,"Huatabampo"],[773,"Magdalena"],[776,"Nacozari de García"],[777,"Navojoa"],[778,"Nogales"],[779,"Puerto Peñasco"],[780,"San Luis Río Colorado"],[790,"Tamulte"],[790,"Villa Hermosa"],[792,"Cárdenas"],[793,"Ciudad Pemex"],[794,"Comalcalco"],[796,"Emiliano Zapata"],[797,"Frontera"],[798,"Huimanguillo"],[800,"Jalpa de Méndez"],[802,"Macuspana"],[803,"Nacajuca"],[804,"Paraíso"],[805,"Tacotalpa"],[806,"Teapa"],[807,"Tenosique"],[810,"Ciudad Victoria"],[811,"Altamira"],[813,"Ciudad Madero"],[813,"Tampico"],[814,"Ciudad Mante"],[818,"Matamoros"],[821,"Colombia"],[821,"Nuevo Laredo"],[822,"Reynosa"],[823,"Río Bravo"],[825,"Soto La Marina"],[826,"Valle Hermoso"],[830,"Tlaxcala"],[832,"Apizaco"],[834,"Santa Ana Chiautempan"],[840,"Jalapa"],[841,"Acayucan"],[843,"Agua Dulce"],[845,"Álamo"],[846,"Altotonga"],[848,"Banderilla"],[849,"Boca del Río"],[852,"Ciudad Mendoza"],[853,"Coatepec"],[854,"Coatzacoalcos"],[855,"Córdoba"],[856,"Cosamaloapan"],[860,"Cuitláhuac"],[863,"Fortín de las Flores"],[864,"Gutiérrez Zamora"],[865,"Huatusco"],[867,"Isla"],[868,"Ixtaczoquitlán"],[869,"Jáltipan"],[871,"Juan Rodríguez Clara"],[872,"Villa José Cardel"],[873,"Las Choapas"],[875,"Naranjos"],[876,"Martínez de la Torre"],[877,"Minatitlán"],[878,"Misantla"],[879,"Nanchital"],[882,"Orizaba"],[885,"Papantla"],[886,"Perote"],[888,"Poza Rica"],[889,"Río Blanco"],[890,"San Andrés Tuxtla"],[891,"San Rafael"],[894,"Platón Sánchez"],[894,"Tantoyuca"],[895,"Tempoal"],[898,"Tierra Blanca"],[901,"Tlapacoyan"],[903,"Túxpam de Rodríguez Cano"],[905,"Cd. Industrial Framboyan"],[905,"Veracruz"],[910,"Mérida"],[913,"Motul"],[914,"Oxkutzcab"],[915,"Progreso"],[917,"Ticul"],[918,"Tizimín"],[920,"Valladolid"],[930,"Zacatecas"],[933,"Fresnillo"],[934,"Guadalupe"],[935,"Jalpa"],[936,"Jerez de G. Salinas"],[938,"Juchipila"],[939,"Loreto"],[946,"Nochistlán"],[958,"Valparaíso"],[960,"Calera de V. Rosales"]]};"object"==typeof module&&(module.exports=clabe);
//! CLABE Validator v1.1.0 ~ github.com/center-key/clabe-validator ~ MIT License
var clabe={version:"1.1.0",calcChecksum:function(a){var o=0;return a.split("").slice(0,17).forEach(function(a,e){o+=parseInt(a)*[3,7,1][e%3]%10}),(10-o%10)%10},validate:function(a){if("string"!=typeof a)throw"clabe.validator.check(clabeNum) -- Expected string, got: "+typeof a;var e=a.substr(0,3),o=a.substr(3,3),n=a.substr(6,11),t=parseInt(a.substr(17,1));clabe.citiesMap||(clabe.citiesMap={},clabe.cities.forEach(function(a){var e;clabe.citiesMap[a[0]]=(e=a[0],(clabe.citiesMap[e]?clabe.citiesMap[e]+", ":"")+a[1])}));var l=clabe.banksMap[parseInt(e)]||{},i=clabe.citiesMap[parseInt(o)];function c(){return clabe.calcChecksum(a)}var r=18!==a.length?"Must be exactly 18 digits long":/[0-9]{18}/.test(a)?c()!==t?"Invalid checksum, last digit should be: "+c():l.tag?!i&&"Invalid city code":"Invalid bank code":"Must be only numeric digits (no letters)";return{ok:!r,error:!!r,message:r||"Valid: "+l.name+" ("+i+")",tag:l.tag,bank:l.name,city:i,account:n,code:{bank:e,city:o}}},calculate:function(a,e,o){function n(a,e){return function a(e,o){return e.length<o?a("0"+e,o):e}(""+a,e).slice(-e)}var t=n(a,3)+n(e,3)+n(o,11);return t+clabe.calcChecksum(t)},banksMap:{2:{tag:"BANAMEX",name:"Banco Nacional de México, S.A."},6:{tag:"BANCOMEXT",name:"Banco Nacional de Comercio Exterior"},9:{tag:"BANOBRAS",name:"Banco Nacional de Obras y Servicios Públicos"},12:{tag:"BBVA BANCOMER",name:"BBVA Bancomer, S.A."},14:{tag:"SANTANDER",name:"Banco Santander, S.A."},19:{tag:"BANJERCITO",name:"Banco Nacional del Ejército, Fuerza Aérea y Armada"},21:{tag:"HSBC",name:"HSBC México, S.A."},22:{tag:"GE MONEY",name:"GE Money Bank, S.A."},30:{tag:"BAJÍO",name:"Banco del Bajío, S.A."},32:{tag:"IXE",name:"IXE Banco, S.A."},36:{tag:"INBURSA",name:"Banco Inbursa, S.A."},37:{tag:"INTERACCIONES",name:"Banco Interacciones, S.A."},42:{tag:"MIFEL",name:"Banca Mifel, S.A."},44:{tag:"SCOTIABANK",name:"Scotiabank Inverlat, S.A."},58:{tag:"BANREGIO",name:"Banco Regional de Monterrey, S.A."},59:{tag:"INVEX",name:"Banco Invex, S.A."},60:{tag:"BANSI",name:"Bansi, S.A."},62:{tag:"AFIRME",name:"Banca Afirme, S.A."},72:{tag:"BANORTE",name:"Banco Mercantil del Norte, S.A."},102:{tag:"ABNAMRO",name:"ABN AMRO Bank México, S.A."},103:{tag:"AMERICAN EXPRESS",name:"American Express Bank (México), S.A."},106:{tag:"BAMSA",name:"Bank of America México, S.A."},108:{tag:"TOKYO",name:"Bank of Tokyo-Mitsubishi UFJ (México), S.A."},110:{tag:"JP MORGAN",name:"Banco J.P. Morgan, S.A."},112:{tag:"BMONEX",name:"Banco Monex, S.A."},113:{tag:"VE POR MAS",name:"Banco Ve por Mas, S.A."},116:{tag:"ING",name:"ING Bank (México), S.A."},124:{tag:"DEUTSCHE",name:"Deutsche Bank México, S.A."},126:{tag:"CREDIT SUISSE",name:"Banco Credit Suisse (México), S.A."},127:{tag:"AZTECA",name:"Banco Azteca, S.A."},128:{tag:"AUTOFIN",name:"Banco Autofin México, S.A."},129:{tag:"BARCLAYS",name:"Barclays Bank México, S.A."},130:{tag:"COMPARTAMOS",name:"Banco Compartamos, S.A."},131:{tag:"FAMSA",name:"Banco Ahorro Famsa, S.A."},132:{tag:"BMULTIVA",name:"Banco Multiva, S.A."},133:{tag:"PRUDENTIAL",name:"Prudencial Bank, S.A."},134:{tag:"WAL-MART",name:"Banco Wal Mart de México Adelante, S.A."},135:{tag:"NAFIN",name:"Nacional Financiera, S.N.C."},136:{tag:"REGIONAL",name:"Banco Regional, S.A."},137:{tag:"BANCOPPEL",name:"BanCoppel, S.A."},138:{tag:"ABC CAPITAL",name:"ABC Capital, S.A. I.B.M."},139:{tag:"UBS BANK",name:"UBS Banco, S.A."},140:{tag:"FÁCIL",name:"Banco Fácil, S.A."},141:{tag:"VOLKSWAGEN",name:"Volkswagen Bank S.A. Institución de Banca Múltiple"},143:{tag:"CIBanco",name:"Consultoría Internacional Banco, S.A."},145:{tag:"BBASE",name:"Banco BASE, S.A. de I.B.M."},147:{tag:"BANKAOOL",name:"Bankaool, S.A., Institución de Banca Múltiple"},148:{tag:"PagaTodo",name:"Banco PagaTodo S.A., Institución de Banca Múltiple"},150:{tag:"BIM",name:"Banco Inmobiliario Mexicano, S.A., Institución de Banca Múltiple"},156:{tag:"SABADELL",name:"Banco Sabadell, S.A. I.B.M."},166:{tag:"BANSEFI",name:"Banco del Ahorro Nacional y Servicios Financieros, S.N.C."},168:{tag:"HIPOTECARIA FEDERAL",name:"Sociedad Hipotecaria Federal, S.N.C."},600:{tag:"MONEXCB",name:"Monex Casa de Bolsa, S.A. de C.V."},601:{tag:"GBM",name:"GBM Grupo Bursátil Mexicano, S.A. de C.V."},602:{tag:"MASARI CC.",name:"Masari Casa de Cambio, S.A. de C.V."},604:{tag:"C.B. INBURSA",name:"Inversora Bursátil, S.A. de C.V."},605:{tag:"VALUÉ",name:"Valué, S.A. de C.V., Casa de Bolsa"},606:{tag:"CB BASE",name:"Base Internacional Casa de Bolsa, S.A. de C.V."},607:{tag:"TIBER",name:"Casa de Cambio Tiber, S.A. de C.V."},608:{tag:"VECTOR",name:"Vector Casa de Bolsa, S.A. de C.V."},610:{tag:"B&B",name:"B y B Casa de Cambio, S.A. de C.V."},611:{tag:"INTERCAM",name:"Intercam Casa de Cambio, S.A. de C.V."},613:{tag:"MULTIVA",name:"Multivalores Casa de Bolsa, S.A. de C.V. Multiva Gpo. Fin."},614:{tag:"ACCIVAL",name:"Acciones y Valores Banamex, S.A. de C.V., Casa de Bolsa"},615:{tag:"MERRILL LYNCH",name:"Merrill Lynch México, S.A. de C.V., Casa de Bolsa"},616:{tag:"FINAMEX",name:"Casa de Bolsa Finamex, S.A. de C.V."},617:{tag:"VALMEX",name:"Valores Mexicanos Casa de Bolsa, S.A. de C.V."},618:{tag:"ÚNICA",name:"Única Casa de Cambio, S.A. de C.V."},619:{tag:"ASEGURADORA MAPFRE",name:"MAPFRE Tepeyac S.A."},620:{tag:"AFORE PROFUTURO",name:"Profuturo G.N.P., S.A. de C.V."},621:{tag:"CB ACTINBER",name:"Actinver Casa de Bolsa, S.A. de C.V."},622:{tag:"ACTINVE SI",name:"Actinver S.A. de C.V."},623:{tag:"SKANDIA",name:"Skandia Vida S.A. de C.V."},624:{tag:"CONSULTORÍA",name:"Consultoría Internacional Casa de Cambio, S.A. de C.V."},626:{tag:"CBDEUTSCHE",name:"Deutsche Securities, S.A. de C.V."},627:{tag:"ZURICH",name:"Zurich Compañía de Seguros, S.A."},628:{tag:"ZURICHVI",name:"Zurich Vida, Compañía de Seguros, S.A."},629:{tag:"HIPOTECARIA SU CASITA",name:"Hipotecaria su Casita, S.A. de C.V."},630:{tag:"C.B. INTERCAM",name:"Intercam Casa de Bolsa, S.A. de C.V."},631:{tag:"C.B. VANGUARDIA",name:"Vanguardia Casa de Bolsa, S.A. de C.V."},632:{tag:"BULLTICK C.B.",name:"Bulltick Casa de Bolsa, S.A. de C.V."},633:{tag:"STERLING",name:"Sterling Casa de Cambio, S.A. de C.V."},634:{tag:"FINCOMUN",name:"Fincomún, Servicios Financieros Comunitarios, S.A. de C.V."},636:{tag:"HDI SEGUROS",name:"HDI Seguros, S.A. de C.V."},637:{tag:"ORDER",name:"OrderExpress Casa de Cambio , S.A. de C.V. AAC"},638:{tag:"AKALA",name:"Akala, S.A. de C.V., Sociedad Financiera Popular"},640:{tag:"JP MORGAN C.B.",name:"J.P. Morgan Casa de Bolsa, S.A. de C.V."},642:{tag:"REFORMA",name:"Operadora de Recursos Reforma, S.A. de C.V."},646:{tag:"STP",name:"Sistema de Transferencias y Pagos STP, S.A. de C.V., SOFOM E.N.R."},647:{tag:"TELECOMM",name:"Telecomunicaciones de México"},648:{tag:"EVERCORE",name:"Evercore Casa de Bolsa, S.A. de C.V."},649:{tag:"SKANDIA",name:"Skandia Operadora S.A. de C.V."},651:{tag:"SEGMTY",name:"Seguros Monterrey New York Life, S.A de C.V."},652:{tag:"ASEA",name:"Solución Asea, S.A. de C.V., Sociedad Financiera Popular"},653:{tag:"KUSPIT",name:"Kuspit Casa de Bolsa, S.A. de C.V."},655:{tag:"SOFIEXPRESS",name:"J.P. SOFIEXPRESS, S.A. de C.V., S.F.P."},656:{tag:"UNAGRA",name:"UNAGRA, S.A. de C.V., S.F.P."},659:{tag:"OPCIONES EMPRESARIALES DEL NOROESTE",name:"Opciones Empresariales Del Noreste, S.A. DE C.V."},670:{tag:"LIBERTAD",name:"Libertad Servicios Financieros, S.A. De C.V."},901:{tag:"CLS",name:"CLS Bank International"},902:{tag:"INDEVAL",name:"SD. INDEVAL, S.A. de C.V."},999:{tag:"N/A",name:"N/A"}},cities:[[10,"Aguascalientes"],[12,"Calvillo"],[14,"Jesús María"],[20,"Mexicali"],[22,"Ensenada"],[27,"Tecate"],[27,"Tijuana"],[28,"La Mesa"],[28,"Rosarito"],[28,"Tijuana [alternate]"],[40,"La Paz"],[41,"Cabo San Lucas"],[42,"Ciudad Constitución"],[43,"Guerrero Negro"],[45,"San José del Cabo"],[46,"Santa Rosalía"],[50,"Campeche"],[51,"Calkiní"],[52,"Ciudad del Carmen"],[53,"Champotón"],[60,"Gómez Palacio"],[60,"Torreón"],[62,"Ciudad Acuña"],[68,"Monclova"],[71,"Nava"],[72,"Nueva Rosita"],[74,"Parras de la Fuente"],[75,"Piedras Negras"],[76,"Ramos Arizpe"],[77,"Sabinas"],[78,"Saltillo"],[80,"San Pedro de las Colonias"],[90,"Colima"],[95,"Manzanillo"],[97,"Tecomán"],[100,"Terán"],[100,"Tuxtla Gutiérrez"],[103,"Arriaga"],[107,"Cintalapa"],[109,"Comitán"],[109,"Villa Las Rosas"],[111,"Chiapa de Corso"],[113,"F. Comalapa"],[114,"Huixtla"],[123,"Ocosingo"],[124,"Ocozocuautla"],[125,"Palenque"],[126,"Pichucalco"],[127,"Pijijiapan"],[128,"Reforma"],[130,"San Cristóbal de las Casas"],[131,"Simojovel"],[133,"Tapachula"],[135,"Tonala"],[137,"Venustiano Carranza"],[138,"Villa Flores"],[140,"Yajalón"],[150,"Chihuahua"],[150,"Ciudad Delicias"],[152,"Ciudad Anáhuac"],[155,"Ciudad Camargo"],[158,"Ciudad Cuauhtémoc"],[161,"Ciudad Guerrero"],[162,"Parral"],[163,"Ciudad Jiménez"],[164,"Ciudad Juárez"],[165,"Ciudad Madera"],[167,"El Molino de Namiquipa"],[168,"Nuevo Casas Grandes"],[180,"Atizapan"],[180,"Chalco"],[180,"Ciudad de México"],[180,"Coacalco"],[180,"Cuautitlán Izcalli"],[180,"Cuautitlán"],[180,"Ecatepec"],[180,"Huehuetoca"],[180,"Huixquilucan"],[180,"Ixtapaluca"],[180,"Los Reyes La Paz"],[180,"Naucalpan"],[180,"Nezahualcóyotl"],[180,"Tecamac"],[180,"Teotihuacán"],[180,"Texcoco"],[180,"Tlalnepantla"],[190,"Durango"],[198,"N/A"],[201,"Tepehuanes"],[202,"Vicente Guerrero"],[210,"Guanajuato"],[211,"Abasolo"],[212,"Acámbaro"],[213,"Apaseo el Alto"],[214,"Apaseo el Grande"],[215,"Celaya"],[216,"Comonfort"],[217,"Coroneo"],[218,"Cortazar"],[219,"Cuerámaro"],[220,"Dolores Hidalgo"],[222,"Irapuato"],[223,"Jaral del Progreso"],[224,"Jerécuaro"],[225,"León"],[226,"Cd. Manuel Doblado"],[227,"Moroleón"],[229,"Pénjamo"],[232,"Romita"],[233,"Salamanca"],[234,"Salvatierra"],[236,"San Felipe"],[237,"Purísima de Bustos"],[237,"San Francisco del Rincoón"],[238,"San José Iturbide"],[239,"San Luis de la Paz"],[240,"San Miguel Allende"],[244,"Silao"],[247,"Uriangato"],[248,"Valle de Santiago"],[249,"Yuriria"],[260,"Chilpancingo"],[261,"Acapulco"],[263,"Arcelia"],[264,"Atoyac de Álvarez"],[266,"Ciudad Altamirano"],[267,"Coyuca de Benítez"],[270,"Chilapa"],[271,"Huitzuco"],[272,"Iguala"],[272,"La Sabana"],[274,"Cuajinicuilapa"],[274,"Ometepec"],[275,"San Marcos"],[276,"Taxco"],[278,"Teloloapan"],[281,"Tlapa"],[282,"Ixtapa Zihuatanejo"],[282,"Zihuatanejo"],[290,"Pachuca"],[291,"Actopan"],[292,"Apam"],[293,"Atotonilco el Grande"],[294,"Ciudad Sahagún"],[294,"Teocaltiche"],[295,"Cuautepec"],[296,"Huejutla"],[297,"Huichapan"],[298,"Ixmiquilpan"],[303,"Progreso de Obregón"],[305,"Tepeapulco"],[308,"Tizayuca"],[311,"Tula de Allende"],[312,"Tulancingo"],[313,"Zacualtipán"],[314,"Zimapán"],[320,"El Salto"],[320,"Guadalajara"],[320,"San Pedro Tlaquepaque"],[320,"Tlajomulco"],[320,"Tonala [alternate]"],[320,"Zapopan"],[326,"Ameca"],[327,"Arandas"],[330,"Atotonilco el Alto"],[331,"Atequiza"],[333,"Autlán"],[334,"Azteca"],[340,"Casimiro Castillo"],[341,"Cihuatlán"],[342,"Ciudad Guzmán"],[346,"Chapala"],[348,"El Grullo"],[355,"Ixtlahuacán del Río"],[356,"Jalostotitlán"],[357,"Jamay"],[361,"La Barca"],[362,"Lagos de Moreno"],[370,"Ocotlán"],[373,"Pihuamo"],[375,"Las Juntas"],[375,"Nuevo Vallarta"],[375,"Pitillal"],[375,"Puerto Vallarta"],[381,"San Juan de los Lagos"],[382,"N/A"],[384,"San Miguel el Alto"],[385,"San Patricio Melaque"],[386,"Sayula"],[387,"Tala"],[389,"Tamazula de Gordiano"],[391,"Tecalitlán"],[396,"Tepatitlán"],[397,"Tequila"],[403,"Tototlán"],[404,"Túxpam"],[411,"Villa Hidalgo"],[413,"Zacoalco de Torres"],[414,"Zapotiltic"],[416,"Zapotlanejo"],[420,"Toluca"],[421,"Acambay"],[422,"Almoloya de Juárez"],[424,"Amecameca"],[425,"Apaxco"],[426,"Atlacomulco"],[428,"Coatepec de Harinas"],[430,"Chicoloapan"],[431,"Chiconcuac"],[432,"El Oro"],[433,"Ixtapan de la Sal"],[434,"Ixtlahuaca"],[435,"Jilotepec"],[438,"Lerma"],[441,"Metepec"],[443,"Otumba"],[445,"San Mateo Atenco"],[446,"Tejupilco"],[448,"Temascaltepec"],[449,"Temoaya"],[450,"Tenancingo"],[451,"Tenago del Valle"],[453,"Santiago Tiangistenco"],[455,"Tultepec"],[456,"Tultitlán"],[457,"Valle de Bravo"],[460,"Villa Nicolás Romero"],[463,"Zumpango"],[470,"Morelia"],[472,"Aguililla"],[476,"Apatzingán"],[480,"Ciudad Hidalgo"],[483,"Cotija"],[484,"Cuitzeo"],[492,"Huetamo"],[493,"Jacona"],[494,"Jiquilpan"],[496,"La Piedad"],[497,"Lázaro Cárdenas"],[498,"Los Reyes"],[499,"Maravatío"],[501,"Nueva Italia"],[506,"Pátzcuaro"],[508,"Purépero"],[509,"Puruandiro"],[512,"Sahuayo"],[515,"Tacámbaro"],[517,"Tangancícuaro"],[519,"Tepalcatepec"],[523,"Tlazazalca"],[528,"Uruapan"],[533,"Yurécuaro"],[534,"Zacapu"],[535,"Zamora"],[536,"Zinapécuaro"],[537,"Zitácuaro"],[540,"Cuernavaca"],[542,"Cuautla"],[542,"Oaxtepec, Morelos"],[543,"Jiutepec"],[544,"Jojutla"],[545,"Puente de Ixtla"],[546,"Temixco"],[548,"Tetecala"],[549,"Yautepec"],[552,"Zacatepec"],[560,"Tepic"],[561,"Acaponeta"],[562,"Ahuacatlán"],[564,"Compostela"],[566,"Ixtlán del Río"],[571,"San Blas"],[573,"Santiago Ixcuintla"],[575,"Túxpam [alternate]"],[580,"Apodaca"],[580,"Cadereyta"],[580,"Cd. Guadalupe"],[580,"General Escobedo"],[580,"Monterrey"],[580,"San Nicolás de los Garza"],[580,"San Pedro Garza García"],[580,"Santa Catarina"],[583,"Allende"],[592,"General Zuazua"],[595,"Linares"],[597,"Montemorelos"],[599,"Sabinas Hidalgo"],[600,"Salinas Victoria"],[601,"El Cercado"],[601,"Villa de Santiago"],[610,"Oaxaca"],[613,"Tlaxiaco"],[614,"Huajuapan de León"],[616,"Ixtepec"],[617,"Juchitán"],[619,"Loma Bonita"],[620,"Matías Romero"],[621,"Miahuatlán"],[622,"Ocotlán [alternate]"],[624,"Puerto Escondido"],[626,"Salina Cruz"],[627,"Lagunas"],[628,"Tuxtepec"],[630,"Pochutla"],[631,"San Pedro Tapanatepec"],[632,"Santa Lucía del Camino"],[634,"Bahías de Huatulco"],[635,"Santiago Juxtlahuaca"],[636,"Pinotepa Nacional"],[637,"Tehuantepec"],[638,"Tlacolula"],[640,"Zimatlán"],[650,"Cholula"],[650,"La Resurrección"],[650,"Puebla"],[650,"San Baltazar Campeche"],[651,"N/A"],[652,"Acatzingo"],[654,"Atlixco"],[656,"Cuetzalan"],[659,"Huauchinango"],[662,"Izúcar de Matamoros"],[667,"San Martín Texmelucan"],[668,"San Felipe Hueyotlipan"],[669,"Tecamachalco"],[670,"Tehuacán"],[671,"San Lorenzo"],[672,"Teziutlán"],[674,"Xicotepec de Juárez"],[676,"Zacatlán"],[680,"Pedro Escobedo"],[680,"Querétaro"],[680,"Villa Corregidora"],[681,"Amealco"],[685,"San Juan del Río"],[686,"Tequisquiapan"],[690,"Chetumal"],[691,"Cancún"],[691,"Col. Puerto Juárez"],[692,"Cozumel"],[693,"N/A"],[694,"Playa del Carmen"],[700,"San Luis Potosí"],[703,"Cerritos"],[705,"Ciudad Valles"],[709,"Matehuala"],[711,"Río Verde"],[716,"Tamuín"],[730,"Culiacán"],[735,"Concordia"],[736,"Cosala"],[737,"Choix"],[738,"El Fuerte"],[739,"Escuinapa"],[740,"Guamúchil"],[741,"Guasave"],[743,"Los Mochis"],[743,"Topolobampo"],[744,"Mazatlán"],[745,"Mocorito"],[746,"Navolato"],[760,"Hermosillo"],[761,"Agua Prieta"],[765,"Caborca"],[766,"Cananea"],[767,"Ciudad Obregón"],[767,"Esperanza"],[769,"Empalme"],[770,"Guaymas"],[770,"San Carlos"],[771,"Huatabampo"],[773,"Magdalena"],[776,"Nacozari de García"],[777,"Navojoa"],[778,"Nogales"],[779,"Puerto Peñasco"],[780,"San Luis Río Colorado"],[790,"Tamulte"],[790,"Villa Hermosa"],[792,"Cárdenas"],[793,"Ciudad Pemex"],[794,"Comalcalco"],[796,"Emiliano Zapata"],[797,"Frontera"],[798,"Huimanguillo"],[800,"Jalpa de Méndez"],[802,"Macuspana"],[803,"Nacajuca"],[804,"Paraíso"],[805,"Tacotalpa"],[806,"Teapa"],[807,"Tenosique"],[810,"Ciudad Victoria"],[811,"Altamira"],[813,"Ciudad Madero"],[813,"Tampico"],[814,"Ciudad Mante"],[818,"Matamoros"],[821,"Colombia"],[821,"Nuevo Laredo"],[822,"Reynosa"],[823,"Río Bravo"],[825,"Soto La Marina"],[826,"Valle Hermoso"],[830,"Tlaxcala"],[832,"Apizaco"],[834,"Santa Ana Chiautempan"],[840,"Jalapa"],[841,"Acayucan"],[843,"Agua Dulce"],[845,"Álamo"],[846,"Altotonga"],[848,"Banderilla"],[849,"Boca del Río"],[852,"Ciudad Mendoza"],[853,"Coatepec"],[854,"Coatzacoalcos"],[855,"Córdoba"],[856,"Cosamaloapan"],[860,"Cuitláhuac"],[863,"Fortín de las Flores"],[864,"Gutiérrez Zamora"],[865,"Huatusco"],[867,"Isla"],[868,"Ixtaczoquitlán"],[869,"Jáltipan"],[871,"Juan Rodríguez Clara"],[872,"Villa José Cardel"],[873,"Las Choapas"],[875,"Naranjos"],[876,"Martínez de la Torre"],[877,"Minatitlán"],[878,"Misantla"],[879,"Nanchital"],[882,"Orizaba"],[885,"Papantla"],[886,"Perote"],[888,"Poza Rica"],[889,"Río Blanco"],[890,"San Andrés Tuxtla"],[891,"San Rafael"],[894,"Platón Sánchez"],[894,"Tantoyuca"],[895,"Tempoal"],[898,"Tierra Blanca"],[901,"Tlapacoyan"],[903,"Túxpam de Rodríguez Cano"],[905,"Cd. Industrial Framboyan"],[905,"Veracruz"],[910,"Mérida"],[913,"Motul"],[914,"Oxkutzcab"],[915,"Progreso"],[917,"Ticul"],[918,"Tizimín"],[920,"Valladolid"],[930,"Zacatecas"],[933,"Fresnillo"],[934,"Guadalupe"],[935,"Jalpa"],[936,"Jerez de G. Salinas"],[938,"Juchipila"],[939,"Loreto"],[946,"Nochistlán"],[958,"Valparaíso"],[960,"Calera de V. Rosales"]]};"object"==typeof module&&(module.exports=clabe),"object"==typeof window&&(window.clabe=clabe);
{
"name": "clabe-validator",
"version": "1.0.6",
"version": "1.1.0",
"description": "JavaScript library to analyze or create a CLABE number for a Mexican bank account",

@@ -32,2 +32,5 @@ "license": "MIT",

},
"engines": {
"node": ">=9.9.0"
},
"devDependencies": {

@@ -34,0 +37,0 @@ "dna.js": "~1.4",

@@ -8,2 +8,3 @@ # CLABE Validator

[![npm](https://img.shields.io/npm/v/clabe-validator.svg)](https://www.npmjs.com/package/clabe-validator)
[![Dependencies](https://david-dm.org/center-key/clabe-validator/status.svg)](https://david-dm.org/center-key/clabe-validator)
[![Vulnerabilities](https://snyk.io/test/github/center-key/clabe-validator/badge.svg)](https://snyk.io/test/github/center-key/clabe-validator)

@@ -52,5 +53,7 @@ [![Build](https://travis-ci.org/center-key/clabe-validator.svg)](https://travis-ci.org/center-key/clabe-validator)

{
error: false,
bank: 'Banco Nacional de México',
city: 'Aguascalientes'
ok: true,
tag: 'BANAMEX',
bank: 'Banco Nacional de México, S.A.',
city: 'Aguascalientes',
account: '07777777777'
}

@@ -62,3 +65,3 @@ ```

{
error: true,
ok: false,
message: 'Invalid city code'

@@ -82,3 +85,3 @@ }

const clabeNum = clabe.calculate(2, 10, 7777777777);
console.log(clabeNum === '002010077777777771');
console.log(clabeNum === '002010077777777771') //true;
```

@@ -85,0 +88,0 @@

@@ -27,10 +27,24 @@ // CLABE Validator

it('contains the correct code to look up a bank tag', () => {
const dataSet = [
{ input: '002', expected: 'BANAMEX' },
{ input: '640', expected: 'JP MORGAN C.B.' },
{ input: '652', expected: 'ASEA' }
];
function evalData(data) {
const actual = { code: data.input, tag: clabe.banksMap[parseInt(data.input)].tag };
const expected = { code: data.input, tag: data.expected };
assert.deepEqual(actual, expected);
}
dataSet.forEach(evalData);
});
it('contains the correct code to look up a bank name', () => {
const dataSet = [
{ input: '002', expected: 'Banco Nacional de México' },
{ input: '640', expected: 'J.P. Morgan Casa de Bolsa' },
{ input: '002', expected: 'Banco Nacional de México, S.A.' },
{ input: '640', expected: 'J.P. Morgan Casa de Bolsa, S.A. de C.V.' },
{ input: '652', expected: 'Solución Asea, S.A. de C.V., Sociedad Financiera Popular' }
];
function evalData(data) {
const actual = { code: data.input, name: clabe.banksMap[parseInt(data.input)] };
const actual = { code: data.input, name: clabe.banksMap[parseInt(data.input)].name };
const expected = { code: data.input, name: data.expected };

@@ -42,5 +56,5 @@ assert.deepEqual(actual, expected);

it('has a default "N/A" bank for code 999', () => {
const actual = { code: 999, name: clabe.banksMap[999] };
const expected = { code: 999, name: 'N/A' };
it('has a default "N/A" bank name and tag for code 999', () => {
const actual = { code: 999, tag: clabe.banksMap[999].tag, name: clabe.banksMap[999].name };
const expected = { code: 999, tag: 'N/A', name: 'N/A' };
assert.deepEqual(actual, expected);

@@ -107,4 +121,4 @@ });

const result = clabe.validate(data.input);
const actual = { clabe: data.input, error: result.error, message: result.message };
const expected = { clabe: data.input, error: true, message: data.expected };
const actual = { clabe: data.input, ok: result.ok, message: result.message };
const expected = { clabe: data.input, ok: false, message: data.expected };
assert.deepEqual(actual, expected);

@@ -125,4 +139,4 @@ }

const valid = /^Valid:/.test(result.message);
const actual = { clabe: data, error: result.error, valid: valid };
const expected = { clabe: data, error: false, valid: true };
const actual = { clabe: data, ok: result.ok, valid: valid };
const expected = { clabe: data, ok: true, valid: true };
assert.deepEqual(actual, expected);

@@ -133,2 +147,32 @@ }

it('extracts the bank tag, bank name, and city', () => {
const clabeCheck = clabe.validate('002010077777777771');
const actual = {
tag: clabeCheck.tag,
bank: clabeCheck.bank,
city: clabeCheck.city
};
const expected = {
tag: 'BANAMEX',
bank: 'Banco Nacional de México, S.A.',
city: 'Aguascalientes'
};
assert.deepEqual(actual, expected);
});
it('extracts the bank code, city code, and account number', () => {
const clabeCheck = clabe.validate('002010077777777771');
const actual = {
bank: clabeCheck.code.bank,
city: clabeCheck.code.city,
account: clabeCheck.account
};
const expected = {
bank: '002',
city: '010',
account: '07777777777'
};
assert.deepEqual(actual, expected);
});
});

@@ -135,0 +179,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc