https://github.com/akzhan/luhn.cr
Very simple library to calculate and validate Luhn numbers
https://github.com/akzhan/luhn.cr
crystal luhn
Last synced: 12 months ago
JSON representation
Very simple library to calculate and validate Luhn numbers
- Host: GitHub
- URL: https://github.com/akzhan/luhn.cr
- Owner: akzhan
- License: mit
- Created: 2017-05-11T01:29:51.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-12T16:37:41.000Z (almost 9 years ago)
- Last Synced: 2025-02-01T09:21:48.705Z (about 1 year ago)
- Topics: crystal, luhn
- Language: Crystal
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# luhn.cr [](https://travis-ci.org/akzhan/luhn.cr) [](https://opensource.org/licenses/MIT)
Very simple library to calculate and validate Luhn numbers.
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
luhn:
github: akzhan/luhn.cr
```
## Usage
```crystal
require "luhn"
number = "4111111111111111"
Luhn.valid? number
# => true
```
## Credits
This shard is fork of [luhn-ruby](https://github.com/rolfb/luhn-ruby) gem.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## Contributors
- [rolfb](https://github.com/rolfb) Rolf Bjaanes - creator of ruby gem
- [dvrensk](https://github.com/dvrensk) David Vrensk
- [Koronen](https://github.com/Koronen) Victor Koronen
- [alan-andrade](https://github.com/alan-andrade) Alan Andrade
- [sfritz](https://github.com/sfritz) Scott Fritz
- [akzhan](https://github.com/akzhan) Akzhan Abdulin - maintainer of crystal shard