creditcards-numb-valid

1.0.1 • Public • Published
Author:Ernesto Cisnero.

creditcards-numb-valid

You can verify if a credit card number is valid or not. Based on Luhn algorithm to check 16 digits credit card numbers.

To install the package:

npm install creditcards-numb-valid

use it:

const validate = require('creditcards-numb-valid');

const validation = validate( /*Number to validate*/ );

return:

if valid:

{ 
    errorCode: false, 
    info: 'The credit card number is valid!'
}

if not valid:

{ 
    errorCode: true, 
    info: 'The credit card number is not valid!'
}

Package Sidebar

Install

npm i creditcards-numb-valid

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

2.11 kB

Total Files

3

Last publish

Collaborators

  • ernesto_cisnero