# credit-card.js 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. ## Usage Type ```javascript // Returns an Object containing the company, MII, and IIN details or Boolean(false). Card('5100 - 0000 - 0000 - 0040').type() ``` Validation ```javascript Card('5100 - 0000 - 0000 - 0040').valid() ``` Validate CSC for a Credit Card Number ```javascript Card('5100 - 0000 - 0000 - 0040').validate_security_number('434'); ``` Validate Expiration Date ```javascript Card('5100 - 0000 - 0000 - 0040').validate_expiration('06', '2023'); ``` Clean ```javascript Card('5100 - 0000 - 0000 - 0040').clean() ``` Format (eg. XXXX XXXX XXXX XXXX) ```javascript Card('5100 - 0000 - 0000 - 0040').format() ``` Truncate ([Pan Truncation](https://en.wikipedia.org/wiki/PAN_truncation)) ```javascript Card('5100 - 0000 - 0000 - 0040').truncate() ``` Card Number Length ```javascript Card('5100 - 0000 - 0000 - 0040').length() ```