Skip to content

Commit

Permalink
Merge pull request #23 from egermano/release/v3.0.0
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
egermano authored Nov 7, 2024
2 parents 7dc3b9e + 703125b commit 7e4754f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# 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](https://travis-ci.org/egermano/brazilian-multidocument-validator.svg?branch=master)](https://travis-ci.org/egermano/brazilian-multidocument-validator)
![Node.js](https://github.com/egermano/brazilian-multidocument-validator/workflows/Node.js/badge.svg)

## Installation
## Installation

```sh
npm add br-doc-validator
# or
Expand All @@ -15,22 +16,26 @@ yarn add br-doc-validator

## Usage

```javascript
const validator = require('br-doc-validator');
const document = '00000000353';
const result = validator.documentValidator(document);
```typescript
import documentValidator from "br-doc-validator";

const document = "00000000353";
const result: boolean = documentValidator(document);

if(result) {
console.log('valid');
if (result) {
console.log("valid");
} else {
console.log('invalid');
console.log("invalid");
}
```

```sh
Output should be 'valid'
```

## Test
## Test

```sh
npm run lint
npm run test
```
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "br-doc-validator",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"description": "Helper library to validate Brazilians documents as CPF and CNPJ.",
"main": "bin/multidocument_validator.js",
Expand Down

0 comments on commit 7e4754f

Please sign in to comment.