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

card-validator

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

card-validator - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

dist/card-validator.js

5

CHANGELOG.md

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

2.0.1
=====
- The npm module now includes built files under `dist/`.
2.0.0

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

2

package.json
{
"name": "card-validator",
"version": "2.0.0",
"version": "2.0.1",
"description": "A library for validating credit card fields",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,2 +9,10 @@ # Credit Card Validator [![Build Status](https://travis-ci.org/braintree/card-validator.svg)](https://travis-ci.org/braintree/card-validator) [![npm version](https://badge.fury.io/js/card-validator.svg)](http://badge.fury.io/js/card-validator)

## Download
You can install `card-validator` through `npm`. The npm module also includes the built, UMD bundle and its minified variant under `dist/`
```
npm install card-validator
```
## Example

@@ -11,0 +19,0 @@

@@ -22,3 +22,3 @@ var isString = require('lodash.isstring');

function cardNumber(value) {
var cardType, valid, i;
var cardType, valid, i, maxLength;

@@ -25,0 +25,0 @@ if (isNumber(value)) {

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

/*eslint-disable*/
module.exports = function luhn10(a,b,c,d,e) {

@@ -2,0 +3,0 @@ for(d = +a[b = a.length-1], e=0; b--;)

@@ -11,13 +11,13 @@ function parseDate(value) {

};
} else {
len = value[0] === '0' || value.length > 5 || value.length === 4 || value.length === 3 ? 2 : 1;
month = value.substr(0, len);
}
return {
month: month,
year: value.substr(month.length, 4)
};
}
len = value[0] === '0' || value.length > 5 || value.length === 4 || value.length === 3 ? 2 : 1;
month = value.substr(0, len);
return {
month: month,
year: value.substr(month.length, 4)
};
}
module.exports = parseDate;
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