This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function cnpjValidation(value) { | |
if (!value) return false | |
// Aceita receber o valor como string, número ou array com todos os dígitos | |
const validTypes = | |
typeof value === 'string' || Number.isInteger(value) || Array.isArray(value) | |
// Elimina valor em formato inválido | |
if (!validTypes) return false |