Skip to content

apoiase/creditcard-warder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

creditcard-warder

Size badge Version badge

About

This module is used to validate credit card numbers and get the brand from input. It can say many brands from Brazil.

Install

With npm do:

npm install creditcard-warder --save

Credit Card Brands

Globals

  • Visa
  • Mastercard
  • Amex
  • Dinersclub
  • Discover
  • Unionpay
  • JCB
  • Forbrugsforeningen
  • Dankort

Brazil

  • Hipercard
  • Aura
  • Visa Electron
  • Maestro

among others.

Usage

var creditcard = require('creditcard-warder');

var card = creditcard('4514166365215946')
card.getBrand(); // forbrugsforeningen
card.validate(); // true

Usage in browser with browserify

CDN latest version:

Build with browserify

npm run build
npm run watch

Test

npm run test
npm run test-browser

About

This module is used to validate credit card numbers and get the brand from input. It can say many brands from Brazil

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%