fast-luhn

A fast Luhn algorithm for validating credit cards

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
fast-luhn
7712.0.26 months ago9 years agoMinified + gzip package size for fast-luhn in KB

Readme

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