burocracia

Version, currently 0.1.01 version
  • 0.1.0latestMay 8, 2018

github.com/vinibrsl/burocracia.cr

👔 Zero-dependency Crystal shard to validate, generate and format Brazilian burocracias (CPF, CNPJ, CEP)

24 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  burocracia:
    github: vinibrsl/burocracia.cr
    version: ~> 0.1.0

Then run:

shards install

shard.yml

Crystal
0.24.2
License
MIT
Author
Vinicius Brasil <marcosbrasilaraujo@gmail.com>

Dependencies

This version declares no dependencies.

README

# burocracia.cr : all Brazilian burocracias solved [![Build Status](https://travis-ci.org/vnbrs/burocracia.cr.svg?branch=master)](https://travis-ci.org/vnbrs/burocracia.cr)

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`:

```yaml
dependencies:
  burocracia:
    github: vnbrs/burocracia.cr
```

## Usage

```crystal
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](https://vnbrs.github.io/burocracia.cr/Burocracia).

## Contributing

1. Fork it ( https://github.com/vnbrs/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 Request

## Contributors

- [vnbrs](https://github.com/vnbrs) Vinicius Brasil - creator, maintainer