2.1.0 • Published 7 years ago
validate-this-card v2.1.0
Validate This Card v2.0.0
This library checks and informs if a credit card number is valid.
Following Luhn algorithm, it returns true if the credit card number entered is valid and false if it's not.
Installation
After installing npm on the computer (more info about it here), enter the following code in the terminal:
$npm install validate-this-cardUsage example
In Node.js, enter:
const lib = require('validate-this-card')
lib.cardValidator(36490102462661);
//trueRoadmap
Version 3.0.0 (tba)
- Upon credit card brand detection, accepts a number only if it has the standard digit size set by each brand;
- Accepts more than one argument (credit card number) at a time.
Version 2.0.0 (published)
- Error's messages and README translated into English.
Version 1.0.0 (published)
- Returns
trueif the credit card number entered is valid andfalseif it's not.