credit-card-regex
Advanced tools
Comparing version 1.1.0 to 1.2.0
14
index.js
@@ -6,3 +6,4 @@ 'use strict'; | ||
var discover = '(?:6(?:011|5[0-9]{2})(?:[0-9]{12}))'; | ||
var jcb = '(?:2131|1800|35\\d{3})\\d{11}'; | ||
var jcb = '(?:(?:2131|1800|35\\d{3})\\d{11})'; | ||
var maestro = '(?:(?:5[0678]\\d\\d|6304|6390|67\\d\\d)\\d{8,15})'; | ||
var mastercard = '(?:5[1-5][0-9]{14})'; | ||
@@ -23,2 +24,3 @@ var visa = '(?:4[0-9]{12})(?:[0-9]{3})?'; | ||
jcb, | ||
maestro, | ||
mastercard, | ||
@@ -70,2 +72,12 @@ visa | ||
/** | ||
* Maestro | ||
* | ||
* @api public | ||
*/ | ||
module.exports.maestro = function () { | ||
return new RegExp('(?:^|\\s)?(["\'])?' + maestro + '\\1', 'g'); | ||
}; | ||
/** | ||
* Mastercard | ||
@@ -72,0 +84,0 @@ * |
{ | ||
"name": "credit-card-regex", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Regular expression for matching credit card numbers", | ||
@@ -19,4 +19,3 @@ "license": "MIT", | ||
"files": [ | ||
"index.js", | ||
"tlds.json" | ||
"index.js" | ||
], | ||
@@ -23,0 +22,0 @@ "keywords": [ |
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
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
3997
80