1.0.8 • Published 3 years ago

creditcard-generators v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

creditcard-generators

This Package is for Generating Random credit cards

npm install creditcard-generators

This package contains 5 methods

1: startWith This allows you specify digits the card should start with. This method takes 2 argument

  • startWith: A string containing the digits the card should start with. should not be more than 10 characters

  • howMany: This is a number. its the amount of cards you want to be generated.

Example

const generate = require('creditcard-generators');

const card = generate.startWith('1345',2);

2: contain This method allows you specify which digit you want the card to contain. it takes an object as argument. The properties include

  • cardType: This is a string. available card types are visa, mastercard, verve and discover.

  • contains: This is a string that contains the digit you want the card to contain. should not exceed 10 characters.

  • howMany: This is a number. its the amount of cards you want to be generated.

Example

const generate = require('creditcard-generators');

const card = generate.contain({ cardType:'visa', contains:'23543', howMany:2 });

3: endWith This method allows you specify which digit you want the card to end with. it takes an object as argument. The properties include

  • cardType: This is a string. available types are visa, mastercard, verve and discover.

  • endWith: This is a string that contains the digit you want the card to end with. should not exceed 10 characters.

  • howMany: This is a number. its the amount of cards you want to be generated.

Example

const generate = require('creditcard-generators');

const card = generate.endWith({ cardType:'visa', contains:'23543', howMany:2 });

4: card This method allows you to generate a card by a specific issuer, by specifying the card type and issuer. it takes an object. you can also just specify the card type without specifying the issuer The property includes

  • cardType: This is a string. available types are visa, mastercard, verve and discover.

  • issuer: the issuing bank. available issuers are zenith, bankofamerica, access,sterling and firstbank. NB: available card type per isssuer include visa and verve - access visa and mastercard - firstbank visa and mastercard - bankofamerica mastercard - zenith verve - sterling

  • howMany: This is a number. its the amount of cards you want to be generated.

Example

const generate = require('creditcard-generators');

const card = generate.card({ cardType:'visa', issuer:'access', howMany:2 });

Example without issuer

const generate = require('creditcard-generators');

const card = generate.card({ cardType:'discover', howMany:2 });

5: industry This method allows you generate a card from a particular industry. it takes two argument

  • industry: This is a string. Available industry includes health, banking, petroleum and airline.

  • howMany: This is a number. its the amount of cards you want to be generated.

const generate = require('creditcard-generators');

const card = generate.industry('airline',2);

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago