0.0.7 • Published 3 years ago

cc-validation v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago