bendrucker / fast-luhn

A fast Luhn algorithm for validating credit cards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A fast Luhn algorithm for validating credit cards

License:MIT License


Languages

Language:JavaScript 89.5%Language:TypeScript 10.5%