# mastercard-validation

> MasterCard credit card validator

Latest version **1.0.2** (published 2016-12-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install mastercard-validation
pnpm add mastercard-validation
yarn add mastercard-validation
bun add mastercard-validation
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-12-11 |
| First published | 2016-12-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Taha El Bouffi |
| Maintainers | thelbouffi |
| Keywords | mastercard, credit card, master, card, validation |

## Links

- npm: https://www.npmjs.com/package/mastercard-validation
- Repository: https://github.com/thelbouffi/mastercard-validation
- Homepage: https://github.com/thelbouffi/mastercard-validation#readme
- Issues: https://github.com/thelbouffi/mastercard-validation/issues
- npm.io page: https://npm.io/package/mastercard-validation

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2016-12-11

## README

## mastercard-validation

mastercard-validation is a module that help you validate a MASTERCARD credit card.

### Basic Usage

To use this module you only have to insert the visa credit card informations into the method `validateMasterCard()`, as shown on the example bellow.
```javascript
var mastercard = require('mastercard-validation');
var card = {
  number: '5430574372474752',
  expiryMonth: '05',
  expiryYear: '2017',
  cvv: '087'
};
var validation = mastercard.validateMasterCard(card);
```

So `console.log(validateMasterCard())` will return an object like this:

```javascript
{ card:
   { number: '5430574372474752',
     expiryMonth: '05',
     expiryYear: '2017',
     cvv: '087' },
  validCardNumber: true,
  validExpiryMonth: true,
  validExpiryYear: true,
  validCvv: true,
  isExpired: false }

```
#### Check also
[visa-validation](https://www.npmjs.com/package/visa-validation)

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