slow-luhn

1.0.0 • Public • Published

slow-luhn

Calculate or validate Luhn algorithm

Usage

const luhn = require('slow-luhn');
luhn('4564456445644564'); // true
luhn('4564456445644563'); // false
luhn('456445644564456', true); // 4

Method

Luhn(checkString, [getChecksumDigit = false]);
+ If getChecksumDigit is true, return (Number) checksum
+ Else return result Luhn test checkString 

Package Sidebar

Install

npm i slow-luhn

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.46 kB

Total Files

4

Last publish

Collaborators

  • 0x0a0d