Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vinibrsl/burocracia.cr
👔 Zero-dependency Crystal shard to validate, generate and format Brazilian burocracias (CPF, CNPJ, CEP)
https://github.com/vinibrsl/burocracia.cr
brasil brazil cep cnpj cpf crystal crystal-language
Last synced: 15 days ago
JSON representation
👔 Zero-dependency Crystal shard to validate, generate and format Brazilian burocracias (CPF, CNPJ, CEP)
- Host: GitHub
- URL: https://github.com/vinibrsl/burocracia.cr
- Owner: vinibrsl
- License: mit
- Created: 2018-05-05T13:28:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-12T18:35:42.000Z (over 4 years ago)
- Last Synced: 2024-05-22T22:08:32.486Z (6 months ago)
- Topics: brasil, brazil, cep, cnpj, cpf, crystal, crystal-language
- Language: Crystal
- Homepage: https://vinibrsl.github.io/burocracia.cr/
- Size: 67.4 KB
- Stars: 20
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-crystal - burocracia.cr - burocracia.cr the dependecyless shard to validate, generate and format Brazilian burocracias such as CPF, CNPJ and CEP (Misc)
- awesome-crystal - burocracia.cr - burocracia.cr the dependecyless shard to validate, generate and format Brazilian burocracias such as CPF, CNPJ and CEP (Misc)
README
# burocracia.cr [![Dependencies](https://img.shields.io/badge/dependencies-0-green.svg)](#) [![GitHub license](https://img.shields.io/github/license/vinibrsl/burocracia.cr.svg)](https://github.com/vinibrsl/burocracia.cr/blob/master/LICENSE)
> All Brazilian boring burocracias solvedburocracia.cr is the dependecyless Crystal shard to validate, generate and format Brazilian burocracias such as CPF, CNPJ and CEP.
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
burocracia:
github: vinibrsl/burocracia.cr
```## Usage
```crystal
require "burocracia"Burocracia::CEP.generate
=> "23230133"Burocracia::CEP.generate(format: true)
=> "71946-192"Burocracia::CEP::Address.find "80210-130"
=> #Burocracia::CPF.valid?("10880423971")
=> falseBurocracia::CNPJ.format("92583745000149")
=> "92.583.745/0001-49"Burocracia::CNPJ.sanitize("92.583.745/0001-49")
=> "92583745000149"
```Read the full documentation [here](https://vinibrsl.github.io/burocracia.cr/Burocracia).
## Contributing
1. Fork it ( https://github.com/vinibrsl/burocracia.cr/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull RequestPlease, don't forget to document the code and run `crystal docs` to apply the changes to `/docs` folder.
## Contributors
- [vinibrsl](https://github.com/vinibrsl) Vinicius Brasil - creator, maintainer