0.0.7 • Published 8 months ago

cc-validation v0.0.7

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

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago