A fast Luhn algorithm for validating credit cards. Adapted from ShirtlessKirk's popular gist.
Installing
$ npm install fast-luhn
API
luhn(number)
-> Boolean
Returns true
/false
depending on whether the Luhn checksum is validnumber
RequiredType:
string
A credit card number.