br-doc-validator
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Brazilian Document Validator

A Node.js module that validate brazilian documents as CPF and CPNJ.

🇧🇷 Modulo em Node.js para validação de documento CPF e CNPJ.

Build Status Node.js

Installation

npm add br-doc-validator
# or
yarn add br-doc-validator

Usage

const validator = require('br-doc-validator');
const document = '00000000353';
const result = validator.documentValidator(document);

if(result) {
    console.log('valid');
} else {
    console.log('invalid');
}
Output should be 'valid'

Test

npm run test

Package Sidebar

Install

npm i br-doc-validator

Weekly Downloads

19

Version

2.0.0

License

Apache-2.0

Unpacked Size

21.3 kB

Total Files

6

Last publish

Collaborators

  • egermano