card-validator
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -0,1 +1,6 @@ | ||
2.0.1 | ||
===== | ||
- The npm module now includes built files under `dist/`. | ||
2.0.0 | ||
@@ -2,0 +7,0 @@ ===== |
{ | ||
"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; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105348
2322
270
16
1
4
1