williamgueiros / Brcpfcnpj

Validação,Formatação e Gerador Cpf/Cnpj em Elixir
MIT License
69 stars 17 forks source link

Code refactoring proposal #16

Closed emaiax closed 5 years ago

emaiax commented 5 years ago

Hello guys, thanks for writing this lib, it's really making my life easier.

Nevertheless, I feel a little confused about how things were organised in the code base. Taking by example, Brcpfcnpj holds all formatting, generation and validations functions to be called, which I understand to be the main module, but who does the hard work is Cpfcnpj module. Even being documented as the responsible module to check whether a document struct is valid or not, also has some formatting and document struct generators which, IMHO, could be somewhere else such as Cpfcnpj.Formatters and Cpfcnpj.Generators.

Let me know WYT and If you agree, I don't mind sending a PR with a few tweaks I'm thinking to be nice we could share.

[question label, pls!]