# creditcard-generator

> Can generate valid credit card numbers for VISA, Amex, Mastercard, Diners, Discover, EnRoute, JCB, Voyager

Latest version **0.0.7** (published 2013-11-11) · 0 weekly downloads

## Install

```sh
npm install creditcard-generator
pnpm add creditcard-generator
yarn add creditcard-generator
bun add creditcard-generator
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2013-11-11 |
| First published | 2013-04-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Maintainers | ExxKA |
| Keywords | credit card, card, credit, creditcard, mod10, generator, luhn, visa, amex, mastercard, diners, discover, enroute, jcb, voyager |

## Links

- npm: https://www.npmjs.com/package/creditcard-generator
- Repository: https://github.com/VRMink/credit-card-generator
- npm.io page: https://npm.io/package/creditcard-generator

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2013-11-11
- 0.0.6 — 2013-10-24
- 0.0.5 — 2013-04-26
- 0.0.4 — 2013-04-26
- 0.0.3 — 2013-04-25
- 0.0.2 — 2013-04-25
- 0.0.1 — 2013-04-25

## README

Credit Card generator
=============

A node.js library for generating test credit card numbers.
The card numbers are valid with respect to the Luhn algorithm (Mod 10 test).
https://en.wikipedia.org/wiki/Luhn_algorithm

Interface
-----
```js
GenCC([Scheme], [numberOfCards]. [pseudoRandomFunction]);
```
pseudoRandomFunction must supply random numbers between 0 to 1.
Use this in conjunction with a seeded random number generator to reproduce test data.

Usage
-----
```js
generator = require('creditcard-generator')
generator.GenCC();
//Will return 1 MasterCardNumber
generator.GenCC("Amex");
//Will return 1 Amex number
generator.GenCC("VISA", 10);
//Will return 10 VisaCards numbers
generator.GenCC("Mastercard", 3, Math.random)
//Will generator 3 Mastercard numbers using the standard random function
```
Contributing
------------
All contributions are welcome. 
Please supply tests.

LICENSE
-------
GNU GPL
https://gnu.org/licenses/gpl.html

Project forked from https://github.com/grahamking/darkcoding-credit-card

---
_Source: https://npm.io/package/creditcard-generator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
