1.0.0 • Published 2 years ago

loohn v1.0.0

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

Loohn - A LUHN algorithm implementation for validating the Credit Card number given is a LUHN number.

Installation / requirements npm install loon

Using the package

//First Require the package, this will import the loon.js object 
const luhn = require('loohn');
//Use the loonChek function,give the 16digit credit card number . The card number can //be stored in the array or can be directly given, see below
luhn.loonChek('4417123456789112')
const carray = [4,4,1,7,1,2,3,4,5,6,7,8,9,1,1,2];
luhn.loonChek(carray);
//the loonChek returns true(boolean) if the credit card number is a valid LUHN number as mentioned in the LUHN Algorithm , else it will return false(boolean)