Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tiagoporto/gerador-validador-cpf
Biblioteca JS open-source para gerar e validar CPF.
https://github.com/tiagoporto/gerador-validador-cpf
cpf generator gerador gerador-validador-cpf hacktoberfest js library open-source package typescript validador validator
Last synced: 20 days ago
JSON representation
Biblioteca JS open-source para gerar e validar CPF.
- Host: GitHub
- URL: https://github.com/tiagoporto/gerador-validador-cpf
- Owner: tiagoporto
- License: mit
- Created: 2014-06-19T01:57:40.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-05-02T04:13:03.000Z (6 months ago)
- Last Synced: 2024-10-05T13:08:54.713Z (about 1 month ago)
- Topics: cpf, generator, gerador, gerador-validador-cpf, hacktoberfest, js, library, open-source, package, typescript, validador, validator
- Language: TypeScript
- Homepage: https://tiagoporto.github.io/gerador-validador-cpf/
- Size: 12.5 MB
- Stars: 390
- Watchers: 12
- Forks: 74
- Open Issues: 8
-
Metadata Files:
- Readme: README-en.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Gerador e Validador de CPF ![Open Source Love](https://badges.frapsoft.com/os/v3/open-source.svg)
[![Release](https://img.shields.io/npm/v/gerador-validador-cpf.svg?style=flat-square&label=release)](https://github.com/tiagoporto/gerador-validador-cpf/releases)
![npm type definitions](https://img.shields.io/npm/types/gerador-validador-cpf.svg?style=flat-square)
[![install size](https://packagephobia.now.sh/badge?p=gerador-validador-cpf)](https://packagephobia.now.sh/result?p=gerador-validador-cpf)
[![bundle size](https://img.shields.io/bundlephobia/min/gerador-validador-cpf?style=flat-square&label=bundle%20size)](https://bundlephobia.com/result?p=gerador-validador-cpf)
[![License](https://img.shields.io/github/license/tiagoporto/gerador-validador-cpf.svg?style=flat-square)](LICENSE)Coverage
[![Tests](https://img.shields.io/github/actions/workflow/status/tiagoporto/gerador-validador-cpf/tests.yml?label=tests&logo=github&style=flat-square)](https://github.com/tiagoporto/gerador-validador-cpf/actions/workflows/tests.yml)
[![Coverage Status](https://img.shields.io/coveralls/tiagoporto/gerador-validador-cpf.svg?logo=coveralls&style=flat-square)](https://coveralls.io/github/tiagoporto/gerador-validador-cpf)
[![Mutation testing cover](https://img.shields.io/endpoint?style=flat-square&url=https://badge-api.stryker-mutator.io/github.com/tiagoporto/gerador-validador-cpf/main)](https://dashboard.stryker-mutator.io/reports/github.com/tiagoporto/gerador-validador-cpf/main)Statistics
![Website](https://img.shields.io/website?style=flat-square&url=https://tiagoporto.github.io/gerador-validador-cpf)
[![Downloads](https://img.shields.io/npm/dt/gerador-validador-cpf.svg?logo=npm&style=flat-square)](https://www.npmjs.com/package/gerador-validador-cpf)
> JS open-source lib to generate and validate CPF.
Tool could be accessed on [tiagoporto.github.io/gerador-validador-cpf](http://tiagoporto.github.io/gerador-validador-cpf).
_Read in other languages: English, [Português(Brasil)](https://github.com/tiagoporto/gerador-validador-cpf)_
## Installation
```sh
npm install gerador-validador-cpf --save
```### Generate CPF
```javascript
import { generate } from 'gerador-validador-cpf'generate() // Generates a CPF in the format 00000000000
generate({ format: true }) // Generates a CPF in the format 000.000.000-00
```### Validate CPF
```javascript
import { validate } from 'gerador-validador-cpf'validate('123.456.789-00')
// or
validate('123.456.789-00')
```**Note:** characters like `.`, `-` and `space` are allowed.
## Contribute
[How to contribute](https://github.com/tiagoporto/.github/blob/main/CONTRIBUTING.md).
## Donation
[![Donate](https://img.shields.io/badge/PayPal-blue?logo=paypal)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YTDUQ8RZ2G4Q8&lc=BR&item_name=tiagoporto&item_number=geradorcpf¤cy_code=BRL&bn=PP%2dDonationsBF:btn_donateCC_LG%2egif:NonHosted)
![Donate](https://img.shields.io/badge/bitcoin-14iqQcwYPLBceRURHuFosGTDXxMmt3cLDp-yellow.svg?logo=bitcoin)## License
Gerador e validador de CPF is released under the terms of the [MIT license](LICENSE).