2.0.2 • Published 2 years ago

fast-luhn v2.0.2

Weekly downloads
27,676
License
MIT
Repository
github
Last release
2 years ago

fast-luhn tests

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 valid

number

Required
Type: string

A credit card number.

License

MIT © Ben Drucker