Validate Luhn number.
# mix.exs
defp deps do
[
{:luhn, "~> 0.3.0"}
]
end
and fetch
$ mix deps.get
# validate number
Luhn.valid? "378282246310005"
# => true
# Integer type number
Luhn.valid? 378282246310005
# => true
$ MIX_ENV=bench mix deps.get
$ MIX_ENV=bench mix compile
$ mix bench
Takayuki Matsubara (@ma2ge on twitter)
MIT