Wondering what’s next for npm?Check out our public roadmap! »

luhn-validator

1.0.0 • Public • Published

luhn-validator

Credit card and IMEI number validation using luhn algorithm

Installation

  npm install luhn-validator

Usage

const luhn = reqiure("luhn-validator");
  
luhn.validateCard("12345678901234");
luhn.validateImei("1234567890123459);

validateCard() return type

  {
    isValid: true,
    type: "Visa"
  }

or

  { isValid: false }

validateImei() return type

 { isValid: true }

or

 { isValid: false }

Install

npm i luhn-validator

DownloadsWeekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

3.61 kB

Total Files

4

Last publish

Collaborators

  • avatar