Brazilian documents validator
List of documents to make authentication
- CPF (Cadastro de Pessoa Física)
- CNPJ (Cadastro Nacional da Pessoa Jurídica)
- PIS (Programa de Integração Social)
Install with NPM
$ npm i validation-docs-br
Install with YARN
$ yarn add validation-docs-br
Basic usage
Import file
;
or
const AuthenticateDocs = ;
Using authenticators
CPF
const authenticate = const result = authenticate// ORconst result = authenticate
CNPJ
const authenticate = const result = authenticate// ORconst result = authenticate
PIS
const authenticate = const result = authenticate// ORconst result = authenticate
Responses
In both cases the response is a boolean
value.
-
true has mean that the document is valid
-
false has mean that the document is invalid