burocracia.cr : all Brazilian burocracias solved
burocracia.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
:
dependencies:
burocracia:
github: vnbrs/burocracia.cr
Usage
require "burocracia"
Burocracia::CEP.generate
=> "23230133"
Burocracia::CEP.generate(format: true)
=> "71946-192"
Burocracia::CEP.valid? "80210130"
=> true
Burocracia::CEP.valid? "80210-130"
=> true
Read the full documentation here.
Contributing
- Fork it ( https://github.com/vnbrs/burocracia.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- vnbrs Vinicius Brasil - creator, maintainer