0.0.7 • Published 2 years ago

cc-validation v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Credit Card Validator

  • Credit Card Number Validation using Luhn Algorithm.
  • Luhn Algorithm
    1. Starting from the end of the card number double the value of every second digit

    2. Subtracting 9 from any digit that is greater than 9

    3. Taking sum of all the digits

    4. If the modulo of the sum equal to 0 then the number is valid.

Installation

npm install cc-validation

Usage

var ccValidation = require("creditCardValidation");
var isValid = console.log(ccValidation.ccNumValidator("4111111111111111"));
0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago