An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# luhn.cr [![Build Status](https://travis-ci.org/akzhan/luhn.cr.svg?branch=master)](https://travis-ci.org/akzhan/luhn.cr) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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