cpf_cnpj
Version, currently master branch1 version
- master branchlatestJun 22, 2016
github.com/cubos/cpf_cnpj-crystal
Pair of classes to validate CPF and CNPJ
1 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
cpf_cnpj:
github: cubos/cpf_cnpj-crystal
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- MIT
- Author
- unnamed author
Dependencies
This version declares no dependencies.
README
cpf_cnpj
Pair of classes to validate Brazil's CPF and CNPJ
Installation
Add this to your application's shard.yml:
dependencies:
cpf_cnpj:
github: CubosTecnologia/cpf_cnpj-crystal
Usage
require "cpf_cnpj"
cpf = CPF.new("182.77702876")
cpf.valid? # true
cpf.to_s # "182.777.028-76"
cnpj = CNPJ.new("66.028.218/0001-62")
cnpj.valid? # true
cnpj.to_s # "66.028.218/0001-62"
Contributing
- Fork it ( https://github.com/CubosTecnologia/cpf_cnpj-crystal/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
- lbguliherme - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jun 22, 2016
- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/cubos/cpf_cnpj-crystal
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1