Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mod10

muhammadghazali37MIT0.0.3

Validate identification numbers using Luhn algorithm

mod10, luhn, modulus 10, mod 10, checksum, credit card validation

readme

NPM version Build Status Dependency Status

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

$ npm install --save mod10

Usage

var mod10 = require('mod10');

// will return true if the identification number is valid
mod10(30569309025904);

License

MIT © Muhammad Ghazali