1.0.7 • Published 2 years ago

credit-card-get-brand v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

credit-card-get-brand

Downloads PayPal

:cloud: Installation

# Using npm
npm install --save credit-card-get-brand

# Using yarn
yarn add credit-card-get-brand

:clipboard: Example

From the card number, return the brand

var creditCard = require("credit-card-get-brand");

const cardNumber = "4111111111111111"; // Visa
const brand = creditCard.getBrand(cardNumber);

console.log(brand);

/* Output:

    {
        code: 'visa',
        name: 'Visa',
        image: 'https://i.im.ge/2022/08/06/FcJsAy.visa.png'
    }
*/

:mag: API

getBrand(cardNumber: String)

getBrand will return an objects with the following data:

KeyTypeDescription
nameStringBrand name
codeStringBrand unique identification
imageStringBrand image link

Accepted brands

  • ELO
  • MASTERCARD
  • MAESTRO
  • AMEX
  • DISCOVER
  • DINERS
  • JCB
  • HIPERCARD
  • VISA
1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago