https://github.com/muhammadghazali/mod10
Validate identification numbers using Luhn algorithm.
https://github.com/muhammadghazali/mod10
luhn-algorithm nodejs
Last synced: 2 days ago
JSON representation
Validate identification numbers using Luhn algorithm.
- Host: GitHub
- URL: https://github.com/muhammadghazali/mod10
- Owner: muhammadghazali
- License: mit
- Created: 2015-03-08T17:21:28.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-15T10:31:51.000Z (about 11 years ago)
- Last Synced: 2025-12-02T09:08:52.692Z (6 months ago)
- Topics: luhn-algorithm, nodejs
- Language: JavaScript
- Homepage:
- Size: 140 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
What Luhn algorithm can do for us ?
> Validate a variety of identification numbers, such as credit card numbers or IMEI numbers.
What Luhn algorithm cannot do for us ?
> Prevent malicious attacks, what Luhn algorightm does is check digits, specifically checking for typos such as missing digits.
## Install
```sh
$ npm install --save mod10
```
## Usage
```js
var mod10 = require('mod10');
// will return true if the identification number is valid
mod10(30569309025904);
```
## License
MIT © [Muhammad Ghazali](http://muhammadghazali.wordpress.com)
[npm-image]: https://badge.fury.io/js/mod10.svg
[npm-url]: https://npmjs.org/package/mod10
[travis-image]: https://travis-ci.org/muhammadghazali/mod10.svg?branch=master
[travis-url]: https://travis-ci.org/muhammadghazali/mod10
[daviddm-image]: https://david-dm.org/muhammadghazali/mod10.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/muhammadghazali/mod10