luhn-algorithm

1.0.1 • Public • Published

Luhn

This is Luhn algorithm to check the validity of card number

How to use?

const luhn = require("luhn-algorithm");

console.log(luhn("5379-4130-2690-0099")); // true
console.log(luhn("4847-3529-8926-349")); // true

console.log(luhn("1234-1234-349")); // false

Readme

Keywords

none

Package Sidebar

Install

npm i luhn-algorithm

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

925 B

Total Files

3

Last publish

Collaborators

  • cehaaa