js-cpf-cnpj-validation
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

js-cpf-cnpj-validation

Lib for CNPJ validation

Javascript CNPJ example:

const cpfOrCnpj = require('js-cpf-cnpj-validation');  
console.log(cpfOrCnpj.isCPForCNPJ("49.623.477/0001-12"))

Output: true

Typescript CNPJ example:

import { isCPForCNPJ } from 'js-cpf-cnpj-validation'
console.log(isCPForCNPJ("49.623.477/0001-12"))

Output: true

Javascript CPF example:

const cpfOrCnpj = require('js-cpf-cnpj-validation');  
console.log(cpfOrCnpj.isCPForCNPJ("153.856.490-40"))

Output: true

Typescript CPF example:

import { isCPForCNPJ } from 'js-cpf-cnpj-validation'
console.log(isCPForCNPJ("153.856.490-40")

Output: true

Package Sidebar

Install

npm i js-cpf-cnpj-validation

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

5.97 kB

Total Files

10

Last publish

Collaborators

  • juliosilvacwb