Allows you to easily validate, clean, check type of card based on number, and verify the security code. It's small, has the fastest luhn implementation, works for all major cards without complex expressions, framework agnostic, and doesn't cost your company a small fortune to use like other libraries.
Easily hook it up to any framework, any code, easy to port.
Type
// Returns an Object containing the company, MII, and IIN details or Boolean(false).
Card('5100 - 0000 - 0000 - 0040').type()
Validation
Card('5100 - 0000 - 0000 - 0040').valid()
Validate CSC for a Credit Card Number
Card('5100 - 0000 - 0000 - 0040').validate_security_number('434');
Validate Expiration Date
Card('5100 - 0000 - 0000 - 0040').validate_expiration('06', '2023');
Clean
Card('5100 - 0000 - 0000 - 0040').clean()
Format (eg. XXXX XXXX XXXX XXXX)
Card('5100 - 0000 - 0000 - 0040').format()
Truncate (Pan Truncation)
Card('5100 - 0000 - 0000 - 0040').truncate()
Card Number Length
Card('5100 - 0000 - 0000 - 0040').length()