[go: up one dir, main page]

Skip to content

πŸ’³ βœ… ❌ JavaScript library to validate credit card numbers using luhn algorithm

License

Notifications You must be signed in to change notification settings

ianaya89/luhn-cc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’³ βœ… ❌ luhn-cc

npm version CircleCI Coverage Status bitHound Overall Score bitHound Dependencies bitHound Dev Dependencies bitHound Code

JavaScript library to validate credit card numbers using luhn algorithm

Installation

$ npm i -S luhn-cc

Usage

import luhnCC from 'luhn-cc';

luhnCC.isValid('378282246310005'); // true
luhnCC.isValid('378282246'); // false

Tested Cards

Credit Card Type Credit Card Number Tested
AMEX 378282246310005 βœ…
AMEX Corporate 378734493671000 βœ…
Australian Bank Card 5610591081018250 βœ…
Diners Club 30569309025904 βœ…
Discover 6011111111111117 βœ…
JCB 3530111333300000 βœ…
Master Card 5555555555554444 βœ…
VISA 4111111111111111 βœ…
Switch/Solo 6331101999990016 βœ…

Development Setup

# install dependencies
$ npm install

# dev mode
$ npm run dev

# test
$ npm run test

# build
$ npm run build

About

πŸ’³ βœ… ❌ JavaScript library to validate credit card numbers using luhn algorithm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published