1.0.0 • Published 6 years ago

check-credit-card v1.0.0

Weekly downloads
10
License
LGPL-3.0
Repository
github
Last release
6 years ago

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

1.0.0

6 years ago