for more information visit the package's GitHub page
Package contains the following modules:
Manipulate and generate brazilian CPFs
repl> Result.map Cpf.show <| Cpf.fromText "12345678909"
-- Ok "123.456.789-09" : Result Cpf.Error String
repl> Result.map Cpf.toString <| Cpf.fromText "12345678909"
-- Ok "12345678909" : Result Cpf.Error String
And you can also use the Random
API
repl> import Random.Cpf exposing (cpf)
repl> cpf
-- Generator <function> : Random.Generator Cpf.CPF