A library designed to validate credit cards using Luhn's algorithm.
- Requires Node.js, NPM and Lodash. If you do not have it, go to:
- In the terminal, go to the folder where you want to use the library and then type:
$ npm install dc-card-validator-lib
$ node
> const library = require("dc-card-validator-lib")
> library.cardValidator(5234210238826905)
> //true
- HTML5
- CSS3
- JavaScript
- NPM
- Mocha
- Chai
- NYC
- Lodash
- Implementation of more comprehensive validation, including verifier code and validity.
- Identification of the main flags (Visa, MasterCard, Diners, Elo and Hipercard), which have different configurations, between 13 and 16 digits.
- Verifies IF a credit card is valid or not, returning true or false.