Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

credit-card-type

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

credit-card-type - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

5

CHANGELOG.md

@@ -0,1 +1,6 @@

4.0.1
=====
- Switch to one version of Lodash
4.0.0

@@ -2,0 +7,0 @@ =====

6

index.js

@@ -1,3 +0,3 @@

var isString = require('lodash.isstring');
var clone = require('lodash.clonedeep');
var isString = require('lodash/lang/isString');
var clone = require('lodash/lang/cloneDeep');

@@ -40,3 +40,3 @@ var types = [

{
niceType: 'DinersClub',
niceType: 'Diners Club',
type: 'diners-club',

@@ -43,0 +43,0 @@ pattern: '^3((0([0-5]\\d*)?)|[689]\\d*)?$',

{
"name": "credit-card-type",
"version": "4.0.0",
"version": "4.0.1",
"description": "A library for determining credit card type",

@@ -41,5 +41,4 @@ "main": "index.js",

"dependencies": {
"lodash.clonedeep": "^3.0.0",
"lodash.isstring": "^3.0.1"
"lodash": "3.10.1"
}
}

@@ -1,2 +0,2 @@

Credit Card Type [![Build Status](https://travis-ci.org/braintree/credit-card-type.svg)](https://travis-ci.org/braintree/credit-card-type) [![npm version](https://badge.fury.io/js/credit-card-type.svg)](http://badge.fury.io/js/credit-card-type)
Credit Card Type [![Build Status](https://travis-ci.org/braintree/credit-card-type.svg)](https://travis-ci.org/braintree/credit-card-type) [![npm version](https://badge.fury.io/js/credit-card-type.svg)](http://badge.fury.io/js/credit-card-type) [![Bower](https://badge.fury.io/bo/credit-card-type.svg)](http://badge.fury.io/bo/credit-card-type)
================

@@ -8,2 +8,15 @@

## Download
To install via npm:
```
npm install credit-card-type
```
To install via Bower:
```
bower install credit-card-type
```
## Example

@@ -32,3 +45,3 @@

| --- | ---- | ----------- |
| `niceType` | `String` | A pretty printed representation of the card brand.<br/>- `Visa`<br />- `MasterCard`<br />- `American Express`<br />- `DinersClub`<br />- `Discover`<br />- `JCB`<br />- `UnionPay`<br />- `Maestro` |
| `niceType` | `String` | A pretty printed representation of the card brand.<br/>- `Visa`<br />- `MasterCard`<br />- `American Express`<br />- `Diners Club`<br />- `Discover`<br />- `JCB`<br />- `UnionPay`<br />- `Maestro` |
| `type` | `String` | A code-friendly presentation of the card brand (useful to class names in CSS).<br/>- `visa`<br />- `master-card`<br />- `american-express`<br />- `diners-club`<br />- `discover`<br />- `jcb`<br />- `unionpay`<br />- `maestro` |

@@ -51,3 +64,3 @@ | `pattern` | `RegExp` | The regular expression used to determine the card type. |

| `American Express` | `CID` | 4 |
| `DinersClub` | `CVV` | 3 |
| `Diners Club` | `CVV` | 3 |
| `Discover` | `CID` | 3 |

@@ -54,0 +67,0 @@ | `JCB` | `CVV` | 3 |

@@ -205,3 +205,3 @@ var expect = require('chai').expect;

});
it('DinersClub', function () {
it('Diners Club', function () {
var code = getCardType('30569309025904')[0].code;

@@ -227,3 +227,3 @@ expect(code.size).to.equal(3);

});
it('DinersClub', function () {
it('Diners Club', function () {
expect(getCardType('305')[0].lengths).to.deep.equal([14]);

@@ -230,0 +230,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc