Comparing version 1.1.8 to 1.1.9
@@ -73,2 +73,5 @@ "use strict"; | ||
strCPF = strCPF.replace(/[^\d]+/g, ''); | ||
if (strCPF.length !== 11) { | ||
return false; | ||
} | ||
var restos = create_cpf(strCPF); | ||
@@ -75,0 +78,0 @@ if (restos[0] !== parseInt(strCPF.substring(9, 10), 10)) { |
@@ -16,2 +16,3 @@ "use strict"; | ||
chai_1.expect(index_1.validateBr.cpf('127.529.875-37')).to.be.false; | ||
chai_1.expect(index_1.validateBr.cpf('00.000.000/0000-00')).to.be.false; | ||
}); | ||
@@ -18,0 +19,0 @@ it('RG', function () { |
{ | ||
"name": "js-brasil", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "Javascript Utils para Brasil (cpf, cnpj...)", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -79,2 +79,5 @@ import { modulo11 } from "./utils"; | ||
strCPF = strCPF.replace(/[^\d]+/g, ''); | ||
if (strCPF.length !== 11) { | ||
return false; | ||
} | ||
const restos = create_cpf(strCPF); | ||
@@ -81,0 +84,0 @@ |
@@ -17,2 +17,3 @@ import { validateBr } from '../index'; | ||
expect(validateBr.cpf('127.529.875-37')).to.be.false; | ||
expect(validateBr.cpf('00.000.000/0000-00')).to.be.false; | ||
}); | ||
@@ -19,0 +20,0 @@ |
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 too big to display
704108
71
12149