0.2.0 • Published 1 year ago

br-docs-validator v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

CPF and CNPJ validator

Installation

npm install br-docs-validator

Usage

import { cpf, cnpj, generic } from "br-docs-validator";

// validates a cpf (with or without punctuation)
const cpfIsValid = cpf.isValid("438.592.280-21");
// #=> true

// validates a cnpj (with or without punctuation)
const cnpjIsValid = cnpj.isValid("79.402.591/0001-83");
// #=> true

// validates the cpf or cnpj depending on the length of the string (can be with or without punctuation)
const cnpjOrCpfIsValid = generic.isValid("79.402.591/0001-83");
// #=> true

License

MIT

Copyright (c) 2024

0.2.0

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago