1.0.0 • Published 6 years ago

card-validator-maya v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Credit card validator

This JavaScript library validates credit card numbers It returns true if the credit card number is valid, and false if the number is not valid.

Usage

install credit card validator, requires npm to be already installed.

npm install card-validator-maya

Example

$node
> let cardValidator = require("card-validator-maya")
> cardValidator(cardNumber); //'true' OR 'false'

It runs using the Luhn algorithm

It throws errors if the input is not a number or not the right length

Validates credit card numbers

Version 1.0.0

Validates any credit card number