Process Visa, American Express, Discover, Mastercard, and JCB Credit Card Numbers
$ npm install credit-card-validator
var creditCardValidator = require('credit-card-validator')
Processes a string containing a partial or full credit card number and returns the card type.
Processes a string contaning a partial or full credit card number and returns the font-awesome class related to the given card.
Processes a string containing a partial or full credit card number and returns the accepted account number lengths for a given card type.
Processes a string containing a partial or full credit card number and returns the accepted security number lengths for a given card type.
Processes a string containing a full credit card number and returns true if the length of the account number given is acceptable for a given type of card.
Processes a string containing a partial or full credit card number along with a security code and returns true if the length of the security code is acceptable for a given type of card.
Processes a string containing a credit card number and returns true if the luhn checksum is correct.
Processes a string containing a full credit card number and returns true if the card number is the right length for the card type and it has a valid luhn checksum.
Processes a string containing a full credit card number and returns true if the account number and security code are the correct length for the card type and it has a valid luhn checksum.
var creditCardValidator = require('credit-card-validator');
var validCard = creditCardValidator.validateCardAndSecCode('4111 1111 1111 1111', '412');