1.1.0 • Published 13 days ago

@malga/card-validator v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
13 days ago

CI

A simple card validator based on the Braintree validator

Getting Started

  1. Install the card-validator 💳
yarn add @malga/card-validator
# or
npm install @malga/card-validator
  1. Now just validate your cards
import cardValidator from '@malga/card-validator'

cardValidator.number('6274160007029307')
/*
{
  card: {
    niceType: 'VR',
    type: 'vr',
    patterns: [ 627416, 637036 ],
    gaps: [],
    lengths: [ 16 ],
    code: { name: 'CVV', size: 3 },
    matchStrength: 6
  },
  isPotentiallyValid: true,
  isValid: true
}
*/

Contributing

Feel free to contribute to this project by submitting pull requests, creating documentation, or bringing ideas to make the project even better!

1.1.0

13 days ago

1.0.1

6 months ago

1.0.0

6 months ago