check-credit-card

1.0.0 • Public • Published

check-credit-card

a creditcard number validator

how to

install

yarn add check_credit_card

test

to run unity test

yarn test
yarn run v1.19.1
$ mocha
 
 
  test check_credit_card
    ✓ invalid card
    ✓ hipercard
    ✓ amex
    ✓ visa
    ✓ master
    ✓ diners
    ✓ elo
    ✓ unionpay
    ✓ discover
 
 
  9 passing (20ms)
 
Done in 0.35s.

use sample

> const checkCrediCard = require("../index");
> assert.equal(true, checkCrediCard.check("6062826266979137).valid;
> assert.equal("HIPERCARD", checkCrediCard.check("6062826266979137").flag);
 

read test file to more sample.

contacts

pedro.leao@gmail.com

Readme

Keywords

none

Package Sidebar

Install

npm i check-credit-card

Weekly Downloads

6

Version

1.0.0

License

LGPL-3.0

Unpacked Size

69.7 kB

Total Files

7

Last publish

Collaborators

  • pedrorleao