Skip to content

Instantly share code, notes, and snippets.


Lucas Pires Simão lucaspiressimao

View GitHub Profile
lucaspiressimao / cnpj.js
Created Aug 19, 2020
Validar CNPJ em js
View cnpj.js
validateCNPJ = cnpj => {
function getDV(value) {
let regDigits = (value.split('')).reverse()
let mod1 = getModule(regDigits)
let mod2 = getModule([mod1,...regDigits])
return `${mod1}${mod2}`
You can’t perform that action at this time.