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.2.7 to 2.2.8

5

CHANGELOG.md

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

2.2.8
=====
- Update `dist` to include version `4.0.3` of credit-card-type
2.2.7

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

558

dist/card-validator.js
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.cardValidator=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
module.exports = {

@@ -11,5 +13,4 @@ number: require('./src/card-number'),

},{"./src/card-number":41,"./src/cvv":42,"./src/expiration-date":43,"./src/expiration-month":44,"./src/expiration-year":45,"./src/postal-code":48}],2:[function(require,module,exports){
var isString = require('lodash/lang/isString');
var clone = require('lodash/lang/cloneDeep');
},{"./src/card-number":29,"./src/cvv":30,"./src/expiration-date":31,"./src/expiration-month":32,"./src/expiration-year":33,"./src/postal-code":36}],2:[function(require,module,exports){
'use strict';

@@ -31,3 +32,3 @@ var types = [

type: 'master-card',
pattern: '^5([1-5]\\d*)?$',
pattern: '^(5|5[1-5]\\d*|2|22|222|222[1-9]\\d*|2[3-6]\\d*|27[0-1]\\d*|2720\\d*)$',
gaps: [4, 8, 12],

@@ -68,3 +69,3 @@ lengths: [16],

gaps: [4, 8, 12],
lengths: [16],
lengths: [16, 19],
code: {

@@ -114,3 +115,5 @@ name: 'CID',

if (!isString(cardNumber)) { return result; }
if (!(typeof cardNumber === 'string' || cardNumber instanceof String)) {
return result;
}

@@ -130,3 +133,7 @@ if (cardNumber === '') { return clone(types); }

},{"lodash/lang/cloneDeep":29,"lodash/lang/isString":36}],3:[function(require,module,exports){
function clone(x) {
return JSON.parse(JSON.stringify(x));
}
},{}],3:[function(require,module,exports){
/** Used as the `TypeError` message for "Functions" methods. */

@@ -192,48 +199,2 @@ var FUNC_ERROR_TEXT = 'Expected a function';

},{}],4:[function(require,module,exports){
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function arrayCopy(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
module.exports = arrayCopy;
},{}],5:[function(require,module,exports){
/**
* A specialized version of `_.forEach` for arrays without support for callback
* shorthands and `this` binding.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
module.exports = arrayEach;
},{}],6:[function(require,module,exports){
var keys = require('../object/keys');

@@ -272,3 +233,3 @@

},{"../object/keys":38}],7:[function(require,module,exports){
},{"../object/keys":26}],5:[function(require,module,exports){
var baseCopy = require('./baseCopy'),

@@ -294,134 +255,4 @@ keys = require('../object/keys');

},{"../object/keys":38,"./baseCopy":9}],8:[function(require,module,exports){
var arrayCopy = require('./arrayCopy'),
arrayEach = require('./arrayEach'),
baseAssign = require('./baseAssign'),
baseForOwn = require('./baseForOwn'),
initCloneArray = require('./initCloneArray'),
initCloneByTag = require('./initCloneByTag'),
initCloneObject = require('./initCloneObject'),
isArray = require('../lang/isArray'),
isObject = require('../lang/isObject');
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] =
cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
cloneableTags[dateTag] = cloneableTags[float32Tag] =
cloneableTags[float64Tag] = cloneableTags[int8Tag] =
cloneableTags[int16Tag] = cloneableTags[int32Tag] =
cloneableTags[numberTag] = cloneableTags[objectTag] =
cloneableTags[regexpTag] = cloneableTags[stringTag] =
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[mapTag] = cloneableTags[setTag] =
cloneableTags[weakMapTag] = false;
/** Used for native method references. */
var objectProto = Object.prototype;
},{"../object/keys":26,"./baseCopy":6}],6:[function(require,module,exports){
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/**
* The base implementation of `_.clone` without support for argument juggling
* and `this` binding `customizer` functions.
*
* @private
* @param {*} value The value to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @param {Function} [customizer] The function to customize cloning values.
* @param {string} [key] The key of `value`.
* @param {Object} [object] The object `value` belongs to.
* @param {Array} [stackA=[]] Tracks traversed source objects.
* @param {Array} [stackB=[]] Associates clones with source counterparts.
* @returns {*} Returns the cloned value.
*/
function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
var result;
if (customizer) {
result = object ? customizer(value, key, object) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
if (!isDeep) {
return arrayCopy(value, result);
}
} else {
var tag = objToString.call(value),
isFunc = tag == funcTag;
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
result = initCloneObject(isFunc ? {} : value);
if (!isDeep) {
return baseAssign(result, value);
}
} else {
return cloneableTags[tag]
? initCloneByTag(value, tag, isDeep)
: (object ? value : {});
}
}
// Check for circular references and return its corresponding clone.
stackA || (stackA = []);
stackB || (stackB = []);
var length = stackA.length;
while (length--) {
if (stackA[length] == value) {
return stackB[length];
}
}
// Add the source value to the stack of traversed objects and associate it with its clone.
stackA.push(value);
stackB.push(result);
// Recursively populate clone (susceptible to call stack limits).
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
});
return result;
}
module.exports = baseClone;
},{"../lang/isArray":31,"../lang/isObject":35,"./arrayCopy":4,"./arrayEach":5,"./baseAssign":7,"./baseForOwn":11,"./initCloneArray":19,"./initCloneByTag":20,"./initCloneObject":21}],9:[function(require,module,exports){
/**
* Copies properties of `source` to `object`.

@@ -450,42 +281,4 @@ *

},{}],10:[function(require,module,exports){
var createBaseFor = require('./createBaseFor');
},{}],7:[function(require,module,exports){
/**
* The base implementation of `baseForIn` and `baseForOwn` which iterates
* over `object` properties returned by `keysFunc` invoking `iteratee` for
* each property. Iteratee functions may exit iteration early by explicitly
* returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseFor = createBaseFor();
module.exports = baseFor;
},{"./createBaseFor":16}],11:[function(require,module,exports){
var baseFor = require('./baseFor'),
keys = require('../object/keys');
/**
* The base implementation of `_.forOwn` without support for callback
* shorthands and `this` binding.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return baseFor(object, iteratee, keys);
}
module.exports = baseForOwn;
},{"../object/keys":38,"./baseFor":10}],12:[function(require,module,exports){
/**
* The base implementation of `_.property` without support for deep paths.

@@ -505,3 +298,3 @@ *

},{}],13:[function(require,module,exports){
},{}],8:[function(require,module,exports){
var identity = require('../utility/identity');

@@ -547,27 +340,3 @@

},{"../utility/identity":40}],14:[function(require,module,exports){
(function (global){
/** Native method references. */
var ArrayBuffer = global.ArrayBuffer,
Uint8Array = global.Uint8Array;
/**
* Creates a clone of the given array buffer.
*
* @private
* @param {ArrayBuffer} buffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function bufferClone(buffer) {
var result = new ArrayBuffer(buffer.byteLength),
view = new Uint8Array(result);
view.set(new Uint8Array(buffer));
return result;
}
module.exports = bufferClone;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],15:[function(require,module,exports){
},{"../utility/identity":28}],9:[function(require,module,exports){
var bindCallback = require('./bindCallback'),

@@ -615,32 +384,3 @@ isIterateeCall = require('./isIterateeCall'),

},{"../function/restParam":3,"./bindCallback":13,"./isIterateeCall":24}],16:[function(require,module,exports){
var toObject = require('./toObject');
/**
* Creates a base function for `_.forIn` or `_.forInRight`.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var iterable = toObject(object),
props = keysFunc(object),
length = props.length,
index = fromRight ? length : -1;
while ((fromRight ? index-- : ++index < length)) {
var key = props[index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
module.exports = createBaseFor;
},{"./toObject":28}],17:[function(require,module,exports){
},{"../function/restParam":3,"./bindCallback":8,"./isIterateeCall":14}],10:[function(require,module,exports){
var baseProperty = require('./baseProperty');

@@ -662,3 +402,3 @@

},{"./baseProperty":12}],18:[function(require,module,exports){
},{"./baseProperty":7}],11:[function(require,module,exports){
var isNative = require('../lang/isNative');

@@ -681,114 +421,3 @@

},{"../lang/isNative":33}],19:[function(require,module,exports){
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Initializes an array clone.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the initialized clone.
*/
function initCloneArray(array) {
var length = array.length,
result = new array.constructor(length);
// Add array properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
module.exports = initCloneArray;
},{}],20:[function(require,module,exports){
var bufferClone = require('./bufferClone');
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
stringTag = '[object String]';
var arrayBufferTag = '[object ArrayBuffer]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
/**
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneByTag(object, tag, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return bufferClone(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case float32Tag: case float64Tag:
case int8Tag: case int16Tag: case int32Tag:
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
var buffer = object.buffer;
return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
var result = new Ctor(object.source, reFlags.exec(object));
result.lastIndex = object.lastIndex;
}
return result;
}
module.exports = initCloneByTag;
},{"./bufferClone":14}],21:[function(require,module,exports){
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
var Ctor = object.constructor;
if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
Ctor = Object;
}
return new Ctor;
}
module.exports = initCloneObject;
},{}],22:[function(require,module,exports){
},{"../lang/isNative":21}],12:[function(require,module,exports){
var getLength = require('./getLength'),

@@ -810,3 +439,3 @@ isLength = require('./isLength');

},{"./getLength":17,"./isLength":25}],23:[function(require,module,exports){
},{"./getLength":10,"./isLength":15}],13:[function(require,module,exports){
/** Used to detect unsigned integer values. */

@@ -837,3 +466,3 @@ var reIsUint = /^\d+$/;

},{}],24:[function(require,module,exports){
},{}],14:[function(require,module,exports){
var isArrayLike = require('./isArrayLike'),

@@ -868,3 +497,3 @@ isIndex = require('./isIndex'),

},{"../lang/isObject":35,"./isArrayLike":22,"./isIndex":23}],25:[function(require,module,exports){
},{"../lang/isObject":23,"./isArrayLike":12,"./isIndex":13}],15:[function(require,module,exports){
/**

@@ -891,3 +520,3 @@ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)

},{}],26:[function(require,module,exports){
},{}],16:[function(require,module,exports){
/**

@@ -906,3 +535,3 @@ * Checks if `value` is object-like.

},{}],27:[function(require,module,exports){
},{}],17:[function(require,module,exports){
var isArguments = require('../lang/isArguments'),

@@ -950,76 +579,3 @@ isArray = require('../lang/isArray'),

},{"../lang/isArguments":30,"../lang/isArray":31,"../object/keysIn":39,"./isIndex":23,"./isLength":25}],28:[function(require,module,exports){
var isObject = require('../lang/isObject');
/**
* Converts `value` to an object if it's not one.
*
* @private
* @param {*} value The value to process.
* @returns {Object} Returns the object.
*/
function toObject(value) {
return isObject(value) ? value : Object(value);
}
module.exports = toObject;
},{"../lang/isObject":35}],29:[function(require,module,exports){
var baseClone = require('../internal/baseClone'),
bindCallback = require('../internal/bindCallback');
/**
* Creates a deep clone of `value`. If `customizer` is provided it's invoked
* to produce the cloned values. If `customizer` returns `undefined` cloning
* is handled by the method instead. The `customizer` is bound to `thisArg`
* and invoked with up to three argument; (value [, index|key, object]).
*
* **Note:** This method is loosely based on the
* [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
* The enumerable properties of `arguments` objects and objects created by
* constructors other than `Object` are cloned to plain `Object` objects. An
* empty object is returned for uncloneable values such as functions, DOM nodes,
* Maps, Sets, and WeakMaps.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to deep clone.
* @param {Function} [customizer] The function to customize cloning values.
* @param {*} [thisArg] The `this` binding of `customizer`.
* @returns {*} Returns the deep cloned value.
* @example
*
* var users = [
* { 'user': 'barney' },
* { 'user': 'fred' }
* ];
*
* var deep = _.cloneDeep(users);
* deep[0] === users[0];
* // => false
*
* // using a customizer callback
* var el = _.cloneDeep(document.body, function(value) {
* if (_.isElement(value)) {
* return value.cloneNode(true);
* }
* });
*
* el === document.body
* // => false
* el.nodeName
* // => BODY
* el.childNodes.length;
* // => 20
*/
function cloneDeep(value, customizer, thisArg) {
return typeof customizer == 'function'
? baseClone(value, true, bindCallback(customizer, thisArg, 3))
: baseClone(value, true);
}
module.exports = cloneDeep;
},{"../internal/baseClone":8,"../internal/bindCallback":13}],30:[function(require,module,exports){
},{"../lang/isArguments":18,"../lang/isArray":19,"../object/keysIn":27,"./isIndex":13,"./isLength":15}],18:[function(require,module,exports){
var isArrayLike = require('../internal/isArrayLike'),

@@ -1060,3 +616,3 @@ isObjectLike = require('../internal/isObjectLike');

},{"../internal/isArrayLike":22,"../internal/isObjectLike":26}],31:[function(require,module,exports){
},{"../internal/isArrayLike":12,"../internal/isObjectLike":16}],19:[function(require,module,exports){
var getNative = require('../internal/getNative'),

@@ -1103,3 +659,3 @@ isLength = require('../internal/isLength'),

},{"../internal/getNative":18,"../internal/isLength":25,"../internal/isObjectLike":26}],32:[function(require,module,exports){
},{"../internal/getNative":11,"../internal/isLength":15,"../internal/isObjectLike":16}],20:[function(require,module,exports){
var isObject = require('./isObject');

@@ -1144,3 +700,3 @@

},{"./isObject":35}],33:[function(require,module,exports){
},{"./isObject":23}],21:[function(require,module,exports){
var isFunction = require('./isFunction'),

@@ -1195,3 +751,3 @@ isObjectLike = require('../internal/isObjectLike');

},{"../internal/isObjectLike":26,"./isFunction":32}],34:[function(require,module,exports){
},{"../internal/isObjectLike":16,"./isFunction":20}],22:[function(require,module,exports){
var isObjectLike = require('../internal/isObjectLike');

@@ -1239,3 +795,3 @@

},{"../internal/isObjectLike":26}],35:[function(require,module,exports){
},{"../internal/isObjectLike":16}],23:[function(require,module,exports){
/**

@@ -1270,3 +826,3 @@ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.

},{}],36:[function(require,module,exports){
},{}],24:[function(require,module,exports){
var isObjectLike = require('../internal/isObjectLike');

@@ -1308,3 +864,3 @@

},{"../internal/isObjectLike":26}],37:[function(require,module,exports){
},{"../internal/isObjectLike":16}],25:[function(require,module,exports){
var assignWith = require('../internal/assignWith'),

@@ -1354,3 +910,3 @@ baseAssign = require('../internal/baseAssign'),

},{"../internal/assignWith":6,"../internal/baseAssign":7,"../internal/createAssigner":15}],38:[function(require,module,exports){
},{"../internal/assignWith":4,"../internal/baseAssign":5,"../internal/createAssigner":9}],26:[function(require,module,exports){
var getNative = require('../internal/getNative'),

@@ -1402,3 +958,3 @@ isArrayLike = require('../internal/isArrayLike'),

},{"../internal/getNative":18,"../internal/isArrayLike":22,"../internal/shimKeys":27,"../lang/isObject":35}],39:[function(require,module,exports){
},{"../internal/getNative":11,"../internal/isArrayLike":12,"../internal/shimKeys":17,"../lang/isObject":23}],27:[function(require,module,exports){
var isArguments = require('../lang/isArguments'),

@@ -1469,3 +1025,3 @@ isArray = require('../lang/isArray'),

},{"../internal/isIndex":23,"../internal/isLength":25,"../lang/isArguments":30,"../lang/isArray":31,"../lang/isObject":35}],40:[function(require,module,exports){
},{"../internal/isIndex":13,"../internal/isLength":15,"../lang/isArguments":18,"../lang/isArray":19,"../lang/isObject":23}],28:[function(require,module,exports){
/**

@@ -1492,3 +1048,5 @@ * This method returns the first argument provided to it.

},{}],41:[function(require,module,exports){
},{}],29:[function(require,module,exports){
'use strict';
var isString = require('lodash/lang/isString');

@@ -1537,3 +1095,3 @@ var extend = require('lodash/object/assign');

if (cardType.lengths[i] === value.length) {
isPotentiallyValid = (value.length !== maxLength) || isValid;
isPotentiallyValid = value.length !== maxLength || isValid;
return verification(cardType, isPotentiallyValid, isValid);

@@ -1548,3 +1106,5 @@ }

},{"./luhn-10":46,"credit-card-type":2,"lodash/lang/isNumber":34,"lodash/lang/isString":36,"lodash/object/assign":37}],42:[function(require,module,exports){
},{"./luhn-10":34,"credit-card-type":2,"lodash/lang/isNumber":22,"lodash/lang/isString":24,"lodash/object/assign":25}],30:[function(require,module,exports){
'use strict';
var isString = require('lodash/lang/isString');

@@ -1593,3 +1153,5 @@ var DEFAULT_LENGTH = 3;

},{"lodash/lang/isString":36}],43:[function(require,module,exports){
},{"lodash/lang/isString":24}],31:[function(require,module,exports){
'use strict';
var parseDate = require('./parse-date');

@@ -1641,3 +1203,5 @@ var expirationMonth = require('./expiration-month');

},{"./expiration-month":44,"./expiration-year":45,"./parse-date":47,"lodash/lang/isString":36}],44:[function(require,module,exports){
},{"./expiration-month":32,"./expiration-year":33,"./parse-date":35,"lodash/lang/isString":24}],32:[function(require,module,exports){
'use strict';
var isString = require('lodash/lang/isString');

@@ -1660,3 +1224,3 @@

}
if ((value.replace(/\s/g, '') === '') || (value === '0')) {
if (value.replace(/\s/g, '') === '' || value === '0') {
return verification(false, true);

@@ -1681,3 +1245,5 @@ }

},{"lodash/lang/isString":36}],45:[function(require,module,exports){
},{"lodash/lang/isString":24}],33:[function(require,module,exports){
'use strict';
var isString = require('lodash/lang/isString');

@@ -1742,4 +1308,6 @@ var maxYear = 19;

},{"lodash/lang/isString":36}],46:[function(require,module,exports){
},{"lodash/lang/isString":24}],34:[function(require,module,exports){
'use strict';
/*eslint-disable*/
module.exports = function luhn10(a,b,c,d,e) {

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

},{}],47:[function(require,module,exports){
},{}],35:[function(require,module,exports){
'use strict';
var expirationYear = require('./expiration-year');

@@ -1792,3 +1362,5 @@ var isArray = require('lodash/lang/isArray');

},{"./expiration-year":45,"lodash/lang/isArray":31}],48:[function(require,module,exports){
},{"./expiration-year":33,"lodash/lang/isArray":19}],36:[function(require,module,exports){
'use strict';
var isString = require('lodash/lang/isString');

@@ -1812,3 +1384,3 @@

},{"lodash/lang/isString":36}]},{},[1])(1)
},{"lodash/lang/isString":24}]},{},[1])(1)
});

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

!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.cardValidator=n()}}(function(){return function n(t,e,r){function i(o,s){if(!e[o]){if(!t[o]){var c="function"==typeof require&&require;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[o]={exports:{}};t[o][0].call(u.exports,function(n){var e=t[o][1][n];return i(e?e:n)},u,u.exports,n,t,e,r)}return e[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(n,t,e){t.exports={number:n("./src/card-number"),expirationDate:n("./src/expiration-date"),expirationMonth:n("./src/expiration-month"),expirationYear:n("./src/expiration-year"),cvv:n("./src/cvv"),postalCode:n("./src/postal-code")}},{"./src/card-number":41,"./src/cvv":42,"./src/expiration-date":43,"./src/expiration-month":44,"./src/expiration-year":45,"./src/postal-code":48}],2:[function(n,t,e){var r=n("lodash/lang/isString"),i=n("lodash/lang/cloneDeep"),a=[{niceType:"Visa",type:"visa",pattern:"^4\\d*$",gaps:[4,8,12],lengths:[16],code:{name:"CVV",size:3}},{niceType:"MasterCard",type:"master-card",pattern:"^5([1-5]\\d*)?$",gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},{niceType:"American Express",type:"american-express",pattern:"^3([47]\\d*)?$",isAmex:!0,gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},{niceType:"Diners Club",type:"diners-club",pattern:"^3((0([0-5]\\d*)?)|[689]\\d*)?$",gaps:[4,10],lengths:[14],code:{name:"CVV",size:3}},{niceType:"Discover",type:"discover",pattern:"^6(0|01|011\\d*|5\\d*|4|4[4-9]\\d*)?$",gaps:[4,8,12],lengths:[16],code:{name:"CID",size:3}},{niceType:"JCB",type:"jcb",pattern:"^((2|21|213|2131\\d*)|(1|18|180|1800\\d*)|(3|35\\d*))$",gaps:[4,8,12],lengths:[16],code:{name:"CVV",size:3}},{niceType:"UnionPay",type:"unionpay",pattern:"^6(2\\d*)?$",gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVN",size:3}},{niceType:"Maestro",type:"maestro",pattern:"^((5((0|[6-9])\\d*)?)|(6|6[37]\\d*))$",gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}}];t.exports=function(n){var t,e,o=[];if(!r(n))return o;if(""===n)return i(a);for(t=0;t<a.length;t++)e=a[t],RegExp(e.pattern).test(n)&&o.push(i(e));return o}},{"lodash/lang/cloneDeep":29,"lodash/lang/isString":36}],3:[function(n,t,e){function r(n,t){if("function"!=typeof n)throw new TypeError(i);return t=a(void 0===t?n.length-1:+t||0,0),function(){for(var e=arguments,r=-1,i=a(e.length-t,0),o=Array(i);++r<i;)o[r]=e[t+r];switch(t){case 0:return n.call(this,o);case 1:return n.call(this,e[0],o);case 2:return n.call(this,e[0],e[1],o)}var s=Array(t+1);for(r=-1;++r<t;)s[r]=e[r];return s[t]=o,n.apply(this,s)}}var i="Expected a function",a=Math.max;t.exports=r},{}],4:[function(n,t,e){function r(n,t){var e=-1,r=n.length;for(t||(t=Array(r));++e<r;)t[e]=n[e];return t}t.exports=r},{}],5:[function(n,t,e){function r(n,t){for(var e=-1,r=n.length;++e<r&&t(n[e],e,n)!==!1;);return n}t.exports=r},{}],6:[function(n,t,e){function r(n,t,e){for(var r=-1,a=i(t),o=a.length;++r<o;){var s=a[r],c=n[s],l=e(c,t[s],s,n,t);(l===l?l===c:c!==c)&&(void 0!==c||s in n)||(n[s]=l)}return n}var i=n("../object/keys");t.exports=r},{"../object/keys":38}],7:[function(n,t,e){function r(n,t){return null==t?n:i(t,a(t),n)}var i=n("./baseCopy"),a=n("../object/keys");t.exports=r},{"../object/keys":38,"./baseCopy":9}],8:[function(n,t,e){function r(n,t,e,y,d,b,h){var j;if(e&&(j=d?e(n,y,d):e(n)),void 0!==j)return j;if(!p(n))return n;var x=f(n);if(x){if(j=c(n),!t)return i(n,j)}else{var m=U.call(n),O=m==v;if(m!=A&&m!=g&&(!O||d))return D[m]?l(n,m,t):d?n:{};if(j=u(O?{}:n),!t)return o(j,n)}b||(b=[]),h||(h=[]);for(var C=b.length;C--;)if(b[C]==n)return h[C];return b.push(n),h.push(j),(x?a:s)(n,function(i,a){j[a]=r(i,t,e,a,n,b,h)}),j}var i=n("./arrayCopy"),a=n("./arrayEach"),o=n("./baseAssign"),s=n("./baseForOwn"),c=n("./initCloneArray"),l=n("./initCloneByTag"),u=n("./initCloneObject"),f=n("../lang/isArray"),p=n("../lang/isObject"),g="[object Arguments]",y="[object Array]",d="[object Boolean]",b="[object Date]",h="[object Error]",v="[object Function]",j="[object Map]",x="[object Number]",A="[object Object]",m="[object RegExp]",O="[object Set]",C="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",V="[object Float32Array]",L="[object Float64Array]",S="[object Int8Array]",I="[object Int16Array]",$="[object Int32Array]",P="[object Uint8Array]",F="[object Uint8ClampedArray]",N="[object Uint16Array]",T="[object Uint32Array]",D={};D[g]=D[y]=D[k]=D[d]=D[b]=D[V]=D[L]=D[S]=D[I]=D[$]=D[x]=D[A]=D[m]=D[C]=D[P]=D[F]=D[N]=D[T]=!0,D[h]=D[v]=D[j]=D[O]=D[w]=!1;var E=Object.prototype,U=E.toString;t.exports=r},{"../lang/isArray":31,"../lang/isObject":35,"./arrayCopy":4,"./arrayEach":5,"./baseAssign":7,"./baseForOwn":11,"./initCloneArray":19,"./initCloneByTag":20,"./initCloneObject":21}],9:[function(n,t,e){function r(n,t,e){e||(e={});for(var r=-1,i=t.length;++r<i;){var a=t[r];e[a]=n[a]}return e}t.exports=r},{}],10:[function(n,t,e){var r=n("./createBaseFor"),i=r();t.exports=i},{"./createBaseFor":16}],11:[function(n,t,e){function r(n,t){return i(n,t,a)}var i=n("./baseFor"),a=n("../object/keys");t.exports=r},{"../object/keys":38,"./baseFor":10}],12:[function(n,t,e){function r(n){return function(t){return null==t?void 0:t[n]}}t.exports=r},{}],13:[function(n,t,e){function r(n,t,e){if("function"!=typeof n)return i;if(void 0===t)return n;switch(e){case 1:return function(e){return n.call(t,e)};case 3:return function(e,r,i){return n.call(t,e,r,i)};case 4:return function(e,r,i,a){return n.call(t,e,r,i,a)};case 5:return function(e,r,i,a,o){return n.call(t,e,r,i,a,o)}}return function(){return n.apply(t,arguments)}}var i=n("../utility/identity");t.exports=r},{"../utility/identity":40}],14:[function(n,t,e){(function(n){function e(n){var t=new r(n.byteLength),e=new i(t);return e.set(new i(n)),t}var r=n.ArrayBuffer,i=n.Uint8Array;t.exports=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],15:[function(n,t,e){function r(n){return o(function(t,e){var r=-1,o=null==t?0:e.length,s=o>2?e[o-2]:void 0,c=o>2?e[2]:void 0,l=o>1?e[o-1]:void 0;for("function"==typeof s?(s=i(s,l,5),o-=2):(s="function"==typeof l?l:void 0,o-=s?1:0),c&&a(e[0],e[1],c)&&(s=3>o?void 0:s,o=1);++r<o;){var u=e[r];u&&n(t,u,s)}return t})}var i=n("./bindCallback"),a=n("./isIterateeCall"),o=n("../function/restParam");t.exports=r},{"../function/restParam":3,"./bindCallback":13,"./isIterateeCall":24}],16:[function(n,t,e){function r(n){return function(t,e,r){for(var a=i(t),o=r(t),s=o.length,c=n?s:-1;n?c--:++c<s;){var l=o[c];if(e(a[l],l,a)===!1)break}return t}}var i=n("./toObject");t.exports=r},{"./toObject":28}],17:[function(n,t,e){var r=n("./baseProperty"),i=r("length");t.exports=i},{"./baseProperty":12}],18:[function(n,t,e){function r(n,t){var e=null==n?void 0:n[t];return i(e)?e:void 0}var i=n("../lang/isNative");t.exports=r},{"../lang/isNative":33}],19:[function(n,t,e){function r(n){var t=n.length,e=new n.constructor(t);return t&&"string"==typeof n[0]&&a.call(n,"index")&&(e.index=n.index,e.input=n.input),e}var i=Object.prototype,a=i.hasOwnProperty;t.exports=r},{}],20:[function(n,t,e){function r(n,t,e){var r=n.constructor;switch(t){case u:return i(n);case a:case o:return new r(+n);case f:case p:case g:case y:case d:case b:case h:case v:case j:var A=n.buffer;return new r(e?i(A):A,n.byteOffset,n.length);case s:case l:return new r(n);case c:var m=new r(n.source,x.exec(n));m.lastIndex=n.lastIndex}return m}var i=n("./bufferClone"),a="[object Boolean]",o="[object Date]",s="[object Number]",c="[object RegExp]",l="[object String]",u="[object ArrayBuffer]",f="[object Float32Array]",p="[object Float64Array]",g="[object Int8Array]",y="[object Int16Array]",d="[object Int32Array]",b="[object Uint8Array]",h="[object Uint8ClampedArray]",v="[object Uint16Array]",j="[object Uint32Array]",x=/\w*$/;t.exports=r},{"./bufferClone":14}],21:[function(n,t,e){function r(n){var t=n.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=r},{}],22:[function(n,t,e){function r(n){return null!=n&&a(i(n))}var i=n("./getLength"),a=n("./isLength");t.exports=r},{"./getLength":17,"./isLength":25}],23:[function(n,t,e){function r(n,t){return n="number"==typeof n||i.test(n)?+n:-1,t=null==t?a:t,n>-1&&n%1==0&&t>n}var i=/^\d+$/,a=9007199254740991;t.exports=r},{}],24:[function(n,t,e){function r(n,t,e){if(!o(e))return!1;var r=typeof t;if("number"==r?i(e)&&a(t,e.length):"string"==r&&t in e){var s=e[t];return n===n?n===s:s!==s}return!1}var i=n("./isArrayLike"),a=n("./isIndex"),o=n("../lang/isObject");t.exports=r},{"../lang/isObject":35,"./isArrayLike":22,"./isIndex":23}],25:[function(n,t,e){function r(n){return"number"==typeof n&&n>-1&&n%1==0&&i>=n}var i=9007199254740991;t.exports=r},{}],26:[function(n,t,e){function r(n){return!!n&&"object"==typeof n}t.exports=r},{}],27:[function(n,t,e){function r(n){for(var t=c(n),e=t.length,r=e&&n.length,l=!!r&&s(r)&&(a(n)||i(n)),f=-1,p=[];++f<e;){var g=t[f];(l&&o(g,r)||u.call(n,g))&&p.push(g)}return p}var i=n("../lang/isArguments"),a=n("../lang/isArray"),o=n("./isIndex"),s=n("./isLength"),c=n("../object/keysIn"),l=Object.prototype,u=l.hasOwnProperty;t.exports=r},{"../lang/isArguments":30,"../lang/isArray":31,"../object/keysIn":39,"./isIndex":23,"./isLength":25}],28:[function(n,t,e){function r(n){return i(n)?n:Object(n)}var i=n("../lang/isObject");t.exports=r},{"../lang/isObject":35}],29:[function(n,t,e){function r(n,t,e){return"function"==typeof t?i(n,!0,a(t,e,3)):i(n,!0)}var i=n("../internal/baseClone"),a=n("../internal/bindCallback");t.exports=r},{"../internal/baseClone":8,"../internal/bindCallback":13}],30:[function(n,t,e){function r(n){return a(n)&&i(n)&&s.call(n,"callee")&&!c.call(n,"callee")}var i=n("../internal/isArrayLike"),a=n("../internal/isObjectLike"),o=Object.prototype,s=o.hasOwnProperty,c=o.propertyIsEnumerable;t.exports=r},{"../internal/isArrayLike":22,"../internal/isObjectLike":26}],31:[function(n,t,e){var r=n("../internal/getNative"),i=n("../internal/isLength"),a=n("../internal/isObjectLike"),o="[object Array]",s=Object.prototype,c=s.toString,l=r(Array,"isArray"),u=l||function(n){return a(n)&&i(n.length)&&c.call(n)==o};t.exports=u},{"../internal/getNative":18,"../internal/isLength":25,"../internal/isObjectLike":26}],32:[function(n,t,e){function r(n){return i(n)&&s.call(n)==a}var i=n("./isObject"),a="[object Function]",o=Object.prototype,s=o.toString;t.exports=r},{"./isObject":35}],33:[function(n,t,e){function r(n){return null==n?!1:i(n)?u.test(c.call(n)):a(n)&&o.test(n)}var i=n("./isFunction"),a=n("../internal/isObjectLike"),o=/^\[object .+?Constructor\]$/,s=Object.prototype,c=Function.prototype.toString,l=s.hasOwnProperty,u=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},{"../internal/isObjectLike":26,"./isFunction":32}],34:[function(n,t,e){function r(n){return"number"==typeof n||i(n)&&s.call(n)==a}var i=n("../internal/isObjectLike"),a="[object Number]",o=Object.prototype,s=o.toString;t.exports=r},{"../internal/isObjectLike":26}],35:[function(n,t,e){function r(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}t.exports=r},{}],36:[function(n,t,e){function r(n){return"string"==typeof n||i(n)&&s.call(n)==a}var i=n("../internal/isObjectLike"),a="[object String]",o=Object.prototype,s=o.toString;t.exports=r},{"../internal/isObjectLike":26}],37:[function(n,t,e){var r=n("../internal/assignWith"),i=n("../internal/baseAssign"),a=n("../internal/createAssigner"),o=a(function(n,t,e){return e?r(n,t,e):i(n,t)});t.exports=o},{"../internal/assignWith":6,"../internal/baseAssign":7,"../internal/createAssigner":15}],38:[function(n,t,e){var r=n("../internal/getNative"),i=n("../internal/isArrayLike"),a=n("../lang/isObject"),o=n("../internal/shimKeys"),s=r(Object,"keys"),c=s?function(n){var t=null==n?void 0:n.constructor;return"function"==typeof t&&t.prototype===n||"function"!=typeof n&&i(n)?o(n):a(n)?s(n):[]}:o;t.exports=c},{"../internal/getNative":18,"../internal/isArrayLike":22,"../internal/shimKeys":27,"../lang/isObject":35}],39:[function(n,t,e){function r(n){if(null==n)return[];c(n)||(n=Object(n));var t=n.length;t=t&&s(t)&&(a(n)||i(n))&&t||0;for(var e=n.constructor,r=-1,l="function"==typeof e&&e.prototype===n,f=Array(t),p=t>0;++r<t;)f[r]=r+"";for(var g in n)p&&o(g,t)||"constructor"==g&&(l||!u.call(n,g))||f.push(g);return f}var i=n("../lang/isArguments"),a=n("../lang/isArray"),o=n("../internal/isIndex"),s=n("../internal/isLength"),c=n("../lang/isObject"),l=Object.prototype,u=l.hasOwnProperty;t.exports=r},{"../internal/isIndex":23,"../internal/isLength":25,"../lang/isArguments":30,"../lang/isArray":31,"../lang/isObject":35}],40:[function(n,t,e){function r(n){return n}t.exports=r},{}],41:[function(n,t,e){function r(n,t,e){return o({},{card:n,isPotentiallyValid:t,isValid:e})}function i(n){var t,e,i,o,u,f;if(l(n)&&(n=String(n)),!a(n))return r(null,!1,!1);if(n=n.replace(/\-|\s/g,""),!/^\d*$/.test(n))return r(null,!1,!1);if(t=c(n),0===t.length)return r(null,!1,!1);if(1!==t.length)return r(null,!0,!1);for(e=t[0],o="unionpay"===e.type?!0:s(n),f=Math.max.apply(null,e.lengths),u=0;u<e.lengths.length;u++)if(e.lengths[u]===n.length)return i=n.length!==f||o,r(e,i,o);return r(e,n.length<f,!1)}var a=n("lodash/lang/isString"),o=n("lodash/object/assign"),s=n("./luhn-10"),c=n("credit-card-type"),l=n("lodash/lang/isNumber");t.exports=i},{"./luhn-10":46,"credit-card-type":2,"lodash/lang/isNumber":34,"lodash/lang/isString":36,"lodash/object/assign":37}],42:[function(n,t,e){function r(n,t){for(var e=0;e<n.length;e++)if(t===n[e])return!0;return!1}function i(n){for(var t=c,e=0;e<n.length;e++)t=n[e]>t?n[e]:t;return t}function a(n,t){return{isValid:n,isPotentiallyValid:t}}function o(n,t){return t=t||c,t=t instanceof Array?t:[t],s(n)&&/^\d*$/.test(n)?r(t,n.length)?a(!0,!0):n.length<Math.min.apply(null,t)?a(!1,!0):n.length>i(t)?a(!1,!1):a(!0,!0):a(!1,!1)}var s=n("lodash/lang/isString"),c=3;t.exports=o},{"lodash/lang/isString":36}],43:[function(n,t,e){function r(n,t,e,r){return{isValid:n,isPotentiallyValid:t,month:e,year:r}}function i(n){var t,e,i,l;if(!c(n))return r(!1,!1,null,null);if(n=n.replace(/^(\d\d) (\d\d(\d\d)?)$/,"$1/$2"),t=a(n),e=o(t.month),i=s(t.year),e.isValid){if(i.isCurrentYear)return l=e.isValidForThisYear,r(l,l,t.month,t.year);if(i.isValid)return r(!0,!0,t.month,t.year)}return e.isPotentiallyValid&&i.isPotentiallyValid?r(!1,!0,null,null):r(!1,!1,null,null)}var a=n("./parse-date"),o=n("./expiration-month"),s=n("./expiration-year"),c=n("lodash/lang/isString");t.exports=i},{"./expiration-month":44,"./expiration-year":45,"./parse-date":47,"lodash/lang/isString":36}],44:[function(n,t,e){function r(n,t,e){return{isValid:n,isPotentiallyValid:t,isValidForThisYear:e||!1}}function i(n){var t,e,i=(new Date).getMonth()+1;return a(n)?""===n.replace(/\s/g,"")||"0"===n?r(!1,!0):/^\d*$/.test(n)?(t=parseInt(n,10),isNaN(n)?r(!1,!1):(e=t>0&&13>t,r(e,e,e&&t>=i))):r(!1,!1):r(!1,!1)}var a=n("lodash/lang/isString");t.exports=i},{"lodash/lang/isString":36}],45:[function(n,t,e){function r(n,t,e){return{isValid:n,isPotentiallyValid:t,isCurrentYear:e||!1}}function i(n){var t,e,i,s,c,l,u;return a(n)?""===n.replace(/\s/g,"")?r(!1,!0):/^\d*$/.test(n)?(s=n.length,2>s?r(!1,!0):(e=(new Date).getFullYear(),3===s?(i=n.slice(0,2),t=String(e).slice(0,2),r(!1,i===t)):s>4?r(!1,!1):(n=parseInt(n,10),c=Number(String(e).substr(2,2)),2===s?(u=c===n,l=n>=c&&c+o>=n):4===s&&(u=e===n,l=n>=e&&e+o>=n),r(l,l,u)))):r(!1,!1):r(!1,!1)}var a=n("lodash/lang/isString"),o=19;t.exports=i},{"lodash/lang/isString":36}],46:[function(n,t,e){t.exports=function(n,t,e,r,i){for(r=+n[t=n.length-1],i=0;t--;)e=+n[t],r+=++i%2?2*e%10+(e>4):e;return!(r%10)}},{}],47:[function(n,t,e){function r(n){var t,e,r,o;return/\//.test(n)?n=n.split(/\s*\/\s*/g):/\s/.test(n)&&(n=n.split(/ +/g)),a(n)?{month:n[0],year:n.slice(1).join()}:(e="0"===n[0]||n.length>5?2:1,"1"===n[0]&&(r=n.substr(1),o=i(r),o.isPotentiallyValid||(e=2)),t=n.substr(0,e),{month:t,year:n.substr(t.length)})}var i=n("./expiration-year"),a=n("lodash/lang/isArray");t.exports=r},{"./expiration-year":45,"lodash/lang/isArray":31}],48:[function(n,t,e){function r(n,t){return{isValid:n,isPotentiallyValid:t}}function i(n){return a(n)?n.length<4?r(!1,!0):r(!0,!0):r(!1,!1)}var a=n("lodash/lang/isString");t.exports=i},{"lodash/lang/isString":36}]},{},[1])(1)});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.cardValidator=t()}}(function(){return function t(n,e,r){function i(o,s){if(!e[o]){if(!n[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=e[o]={exports:{}};n[o][0].call(c.exports,function(t){var e=n[o][1][t];return i(e?e:t)},c,c.exports,t,n,e,r)}return e[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(t,n,e){"use strict";n.exports={number:t("./src/card-number"),expirationDate:t("./src/expiration-date"),expirationMonth:t("./src/expiration-month"),expirationYear:t("./src/expiration-year"),cvv:t("./src/cvv"),postalCode:t("./src/postal-code")}},{"./src/card-number":29,"./src/cvv":30,"./src/expiration-date":31,"./src/expiration-month":32,"./src/expiration-year":33,"./src/postal-code":36}],2:[function(t,n,e){"use strict";function r(t){return JSON.parse(JSON.stringify(t))}var i=[{niceType:"Visa",type:"visa",pattern:"^4\\d*$",gaps:[4,8,12],lengths:[16],code:{name:"CVV",size:3}},{niceType:"MasterCard",type:"master-card",pattern:"^(5|5[1-5]\\d*|2|22|222|222[1-9]\\d*|2[3-6]\\d*|27[0-1]\\d*|2720\\d*)$",gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},{niceType:"American Express",type:"american-express",pattern:"^3([47]\\d*)?$",isAmex:!0,gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},{niceType:"Diners Club",type:"diners-club",pattern:"^3((0([0-5]\\d*)?)|[689]\\d*)?$",gaps:[4,10],lengths:[14],code:{name:"CVV",size:3}},{niceType:"Discover",type:"discover",pattern:"^6(0|01|011\\d*|5\\d*|4|4[4-9]\\d*)?$",gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},{niceType:"JCB",type:"jcb",pattern:"^((2|21|213|2131\\d*)|(1|18|180|1800\\d*)|(3|35\\d*))$",gaps:[4,8,12],lengths:[16],code:{name:"CVV",size:3}},{niceType:"UnionPay",type:"unionpay",pattern:"^6(2\\d*)?$",gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVN",size:3}},{niceType:"Maestro",type:"maestro",pattern:"^((5((0|[6-9])\\d*)?)|(6|6[37]\\d*))$",gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}}];n.exports=function(t){var n,e,a=[];if(!("string"==typeof t||t instanceof String))return a;if(""===t)return r(i);for(n=0;n<i.length;n++)e=i[n],RegExp(e.pattern).test(t)&&a.push(r(e));return a}},{}],3:[function(t,n,e){function r(t,n){if("function"!=typeof t)throw new TypeError(i);return n=a(void 0===n?t.length-1:+n||0,0),function(){for(var e=arguments,r=-1,i=a(e.length-n,0),o=Array(i);++r<i;)o[r]=e[n+r];switch(n){case 0:return t.call(this,o);case 1:return t.call(this,e[0],o);case 2:return t.call(this,e[0],e[1],o)}var s=Array(n+1);for(r=-1;++r<n;)s[r]=e[r];return s[n]=o,t.apply(this,s)}}var i="Expected a function",a=Math.max;n.exports=r},{}],4:[function(t,n,e){function r(t,n,e){for(var r=-1,a=i(n),o=a.length;++r<o;){var s=a[r],l=t[s],u=e(l,n[s],s,t,n);(u===u?u===l:l!==l)&&(void 0!==l||s in t)||(t[s]=u)}return t}var i=t("../object/keys");n.exports=r},{"../object/keys":26}],5:[function(t,n,e){function r(t,n){return null==n?t:i(n,a(n),t)}var i=t("./baseCopy"),a=t("../object/keys");n.exports=r},{"../object/keys":26,"./baseCopy":6}],6:[function(t,n,e){function r(t,n,e){e||(e={});for(var r=-1,i=n.length;++r<i;){var a=n[r];e[a]=t[a]}return e}n.exports=r},{}],7:[function(t,n,e){function r(t){return function(n){return null==n?void 0:n[t]}}n.exports=r},{}],8:[function(t,n,e){function r(t,n,e){if("function"!=typeof t)return i;if(void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 3:return function(e,r,i){return t.call(n,e,r,i)};case 4:return function(e,r,i,a){return t.call(n,e,r,i,a)};case 5:return function(e,r,i,a,o){return t.call(n,e,r,i,a,o)}}return function(){return t.apply(n,arguments)}}var i=t("../utility/identity");n.exports=r},{"../utility/identity":28}],9:[function(t,n,e){function r(t){return o(function(n,e){var r=-1,o=null==n?0:e.length,s=o>2?e[o-2]:void 0,l=o>2?e[2]:void 0,u=o>1?e[o-1]:void 0;for("function"==typeof s?(s=i(s,u,5),o-=2):(s="function"==typeof u?u:void 0,o-=s?1:0),l&&a(e[0],e[1],l)&&(s=3>o?void 0:s,o=1);++r<o;){var c=e[r];c&&t(n,c,s)}return n})}var i=t("./bindCallback"),a=t("./isIterateeCall"),o=t("../function/restParam");n.exports=r},{"../function/restParam":3,"./bindCallback":8,"./isIterateeCall":14}],10:[function(t,n,e){var r=t("./baseProperty"),i=r("length");n.exports=i},{"./baseProperty":7}],11:[function(t,n,e){function r(t,n){var e=null==t?void 0:t[n];return i(e)?e:void 0}var i=t("../lang/isNative");n.exports=r},{"../lang/isNative":21}],12:[function(t,n,e){function r(t){return null!=t&&a(i(t))}var i=t("./getLength"),a=t("./isLength");n.exports=r},{"./getLength":10,"./isLength":15}],13:[function(t,n,e){function r(t,n){return t="number"==typeof t||i.test(t)?+t:-1,n=null==n?a:n,t>-1&&t%1==0&&n>t}var i=/^\d+$/,a=9007199254740991;n.exports=r},{}],14:[function(t,n,e){function r(t,n,e){if(!o(e))return!1;var r=typeof n;if("number"==r?i(e)&&a(n,e.length):"string"==r&&n in e){var s=e[n];return t===t?t===s:s!==s}return!1}var i=t("./isArrayLike"),a=t("./isIndex"),o=t("../lang/isObject");n.exports=r},{"../lang/isObject":23,"./isArrayLike":12,"./isIndex":13}],15:[function(t,n,e){function r(t){return"number"==typeof t&&t>-1&&t%1==0&&i>=t}var i=9007199254740991;n.exports=r},{}],16:[function(t,n,e){function r(t){return!!t&&"object"==typeof t}n.exports=r},{}],17:[function(t,n,e){function r(t){for(var n=l(t),e=n.length,r=e&&t.length,u=!!r&&s(r)&&(a(t)||i(t)),p=-1,f=[];++p<e;){var g=n[p];(u&&o(g,r)||c.call(t,g))&&f.push(g)}return f}var i=t("../lang/isArguments"),a=t("../lang/isArray"),o=t("./isIndex"),s=t("./isLength"),l=t("../object/keysIn"),u=Object.prototype,c=u.hasOwnProperty;n.exports=r},{"../lang/isArguments":18,"../lang/isArray":19,"../object/keysIn":27,"./isIndex":13,"./isLength":15}],18:[function(t,n,e){function r(t){return a(t)&&i(t)&&s.call(t,"callee")&&!l.call(t,"callee")}var i=t("../internal/isArrayLike"),a=t("../internal/isObjectLike"),o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable;n.exports=r},{"../internal/isArrayLike":12,"../internal/isObjectLike":16}],19:[function(t,n,e){var r=t("../internal/getNative"),i=t("../internal/isLength"),a=t("../internal/isObjectLike"),o="[object Array]",s=Object.prototype,l=s.toString,u=r(Array,"isArray"),c=u||function(t){return a(t)&&i(t.length)&&l.call(t)==o};n.exports=c},{"../internal/getNative":11,"../internal/isLength":15,"../internal/isObjectLike":16}],20:[function(t,n,e){function r(t){return i(t)&&s.call(t)==a}var i=t("./isObject"),a="[object Function]",o=Object.prototype,s=o.toString;n.exports=r},{"./isObject":23}],21:[function(t,n,e){function r(t){return null==t?!1:i(t)?c.test(l.call(t)):a(t)&&o.test(t)}var i=t("./isFunction"),a=t("../internal/isObjectLike"),o=/^\[object .+?Constructor\]$/,s=Object.prototype,l=Function.prototype.toString,u=s.hasOwnProperty,c=RegExp("^"+l.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");n.exports=r},{"../internal/isObjectLike":16,"./isFunction":20}],22:[function(t,n,e){function r(t){return"number"==typeof t||i(t)&&s.call(t)==a}var i=t("../internal/isObjectLike"),a="[object Number]",o=Object.prototype,s=o.toString;n.exports=r},{"../internal/isObjectLike":16}],23:[function(t,n,e){function r(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}n.exports=r},{}],24:[function(t,n,e){function r(t){return"string"==typeof t||i(t)&&s.call(t)==a}var i=t("../internal/isObjectLike"),a="[object String]",o=Object.prototype,s=o.toString;n.exports=r},{"../internal/isObjectLike":16}],25:[function(t,n,e){var r=t("../internal/assignWith"),i=t("../internal/baseAssign"),a=t("../internal/createAssigner"),o=a(function(t,n,e){return e?r(t,n,e):i(t,n)});n.exports=o},{"../internal/assignWith":4,"../internal/baseAssign":5,"../internal/createAssigner":9}],26:[function(t,n,e){var r=t("../internal/getNative"),i=t("../internal/isArrayLike"),a=t("../lang/isObject"),o=t("../internal/shimKeys"),s=r(Object,"keys"),l=s?function(t){var n=null==t?void 0:t.constructor;return"function"==typeof n&&n.prototype===t||"function"!=typeof t&&i(t)?o(t):a(t)?s(t):[]}:o;n.exports=l},{"../internal/getNative":11,"../internal/isArrayLike":12,"../internal/shimKeys":17,"../lang/isObject":23}],27:[function(t,n,e){function r(t){if(null==t)return[];l(t)||(t=Object(t));var n=t.length;n=n&&s(n)&&(a(t)||i(t))&&n||0;for(var e=t.constructor,r=-1,u="function"==typeof e&&e.prototype===t,p=Array(n),f=n>0;++r<n;)p[r]=r+"";for(var g in t)f&&o(g,n)||"constructor"==g&&(u||!c.call(t,g))||p.push(g);return p}var i=t("../lang/isArguments"),a=t("../lang/isArray"),o=t("../internal/isIndex"),s=t("../internal/isLength"),l=t("../lang/isObject"),u=Object.prototype,c=u.hasOwnProperty;n.exports=r},{"../internal/isIndex":13,"../internal/isLength":15,"../lang/isArguments":18,"../lang/isArray":19,"../lang/isObject":23}],28:[function(t,n,e){function r(t){return t}n.exports=r},{}],29:[function(t,n,e){"use strict";function r(t,n,e){return o({},{card:t,isPotentiallyValid:n,isValid:e})}function i(t){var n,e,i,o,c,p;if(u(t)&&(t=String(t)),!a(t))return r(null,!1,!1);if(t=t.replace(/\-|\s/g,""),!/^\d*$/.test(t))return r(null,!1,!1);if(n=l(t),0===n.length)return r(null,!1,!1);if(1!==n.length)return r(null,!0,!1);for(e=n[0],o="unionpay"===e.type?!0:s(t),p=Math.max.apply(null,e.lengths),c=0;c<e.lengths.length;c++)if(e.lengths[c]===t.length)return i=t.length!==p||o,r(e,i,o);return r(e,t.length<p,!1)}var a=t("lodash/lang/isString"),o=t("lodash/object/assign"),s=t("./luhn-10"),l=t("credit-card-type"),u=t("lodash/lang/isNumber");n.exports=i},{"./luhn-10":34,"credit-card-type":2,"lodash/lang/isNumber":22,"lodash/lang/isString":24,"lodash/object/assign":25}],30:[function(t,n,e){"use strict";function r(t,n){for(var e=0;e<t.length;e++)if(n===t[e])return!0;return!1}function i(t){for(var n=l,e=0;e<t.length;e++)n=t[e]>n?t[e]:n;return n}function a(t,n){return{isValid:t,isPotentiallyValid:n}}function o(t,n){return n=n||l,n=n instanceof Array?n:[n],s(t)&&/^\d*$/.test(t)?r(n,t.length)?a(!0,!0):t.length<Math.min.apply(null,n)?a(!1,!0):t.length>i(n)?a(!1,!1):a(!0,!0):a(!1,!1)}var s=t("lodash/lang/isString"),l=3;n.exports=o},{"lodash/lang/isString":24}],31:[function(t,n,e){"use strict";function r(t,n,e,r){return{isValid:t,isPotentiallyValid:n,month:e,year:r}}function i(t){var n,e,i,u;if(!l(t))return r(!1,!1,null,null);if(t=t.replace(/^(\d\d) (\d\d(\d\d)?)$/,"$1/$2"),n=a(t),e=o(n.month),i=s(n.year),e.isValid){if(i.isCurrentYear)return u=e.isValidForThisYear,r(u,u,n.month,n.year);if(i.isValid)return r(!0,!0,n.month,n.year)}return e.isPotentiallyValid&&i.isPotentiallyValid?r(!1,!0,null,null):r(!1,!1,null,null)}var a=t("./parse-date"),o=t("./expiration-month"),s=t("./expiration-year"),l=t("lodash/lang/isString");n.exports=i},{"./expiration-month":32,"./expiration-year":33,"./parse-date":35,"lodash/lang/isString":24}],32:[function(t,n,e){"use strict";function r(t,n,e){return{isValid:t,isPotentiallyValid:n,isValidForThisYear:e||!1}}function i(t){var n,e,i=(new Date).getMonth()+1;return a(t)?""===t.replace(/\s/g,"")||"0"===t?r(!1,!0):/^\d*$/.test(t)?(n=parseInt(t,10),isNaN(t)?r(!1,!1):(e=n>0&&13>n,r(e,e,e&&n>=i))):r(!1,!1):r(!1,!1)}var a=t("lodash/lang/isString");n.exports=i},{"lodash/lang/isString":24}],33:[function(t,n,e){"use strict";function r(t,n,e){return{isValid:t,isPotentiallyValid:n,isCurrentYear:e||!1}}function i(t){var n,e,i,s,l,u,c;return a(t)?""===t.replace(/\s/g,"")?r(!1,!0):/^\d*$/.test(t)?(s=t.length,2>s?r(!1,!0):(e=(new Date).getFullYear(),3===s?(i=t.slice(0,2),n=String(e).slice(0,2),r(!1,i===n)):s>4?r(!1,!1):(t=parseInt(t,10),l=Number(String(e).substr(2,2)),2===s?(c=l===t,u=t>=l&&l+o>=t):4===s&&(c=e===t,u=t>=e&&e+o>=t),r(u,u,c)))):r(!1,!1):r(!1,!1)}var a=t("lodash/lang/isString"),o=19;n.exports=i},{"lodash/lang/isString":24}],34:[function(t,n,e){"use strict";n.exports=function(t,n,e,r,i){for(r=+t[n=t.length-1],i=0;n--;)e=+t[n],r+=++i%2?2*e%10+(e>4):e;return!(r%10)}},{}],35:[function(t,n,e){"use strict";function r(t){var n,e,r,o;return/\//.test(t)?t=t.split(/\s*\/\s*/g):/\s/.test(t)&&(t=t.split(/ +/g)),a(t)?{month:t[0],year:t.slice(1).join()}:(e="0"===t[0]||t.length>5?2:1,"1"===t[0]&&(r=t.substr(1),o=i(r),o.isPotentiallyValid||(e=2)),n=t.substr(0,e),{month:n,year:t.substr(n.length)})}var i=t("./expiration-year"),a=t("lodash/lang/isArray");n.exports=r},{"./expiration-year":33,"lodash/lang/isArray":19}],36:[function(t,n,e){"use strict";function r(t,n){return{isValid:t,isPotentiallyValid:n}}function i(t){return a(t)?t.length<4?r(!1,!0):r(!0,!0):r(!1,!1)}var a=t("lodash/lang/isString");n.exports=i},{"lodash/lang/isString":24}]},{},[1])(1)});

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

'use strict';
module.exports = {

@@ -2,0 +4,0 @@ number: require('./src/card-number'),

{
"name": "card-validator",
"version": "2.2.7",
"version": "2.2.8",
"description": "A library for validating credit card fields",

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

"scripts": {
"test": "gulp lint && mocha test/**/*.js",
"build": "gulp build"
"lint": "eslint .",
"test": "npm run lint && mocha test/**/*.js",
"build": "npm run lint && gulp build"
},

@@ -22,4 +23,5 @@ "author": "",

"del": "^1.1.0",
"eslint": "2.7.0",
"eslint-config-braintree": "1.0.0",
"gulp": "^3.8.8",
"gulp-eslint": "^0.14.0",
"gulp-rename": "^1.2.0",

@@ -26,0 +28,0 @@ "gulp-size": "^1.1.0",

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

'use strict';
var isString = require('lodash/lang/isString');

@@ -44,3 +46,3 @@ var extend = require('lodash/object/assign');

if (cardType.lengths[i] === value.length) {
isPotentiallyValid = (value.length !== maxLength) || isValid;
isPotentiallyValid = value.length !== maxLength || isValid;
return verification(cardType, isPotentiallyValid, isValid);

@@ -47,0 +49,0 @@ }

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

'use strict';
var isString = require('lodash/lang/isString');

@@ -2,0 +4,0 @@ var DEFAULT_LENGTH = 3;

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

'use strict';
var parseDate = require('./parse-date');

@@ -2,0 +4,0 @@ var expirationMonth = require('./expiration-month');

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

'use strict';
var isString = require('lodash/lang/isString');

@@ -18,3 +20,3 @@

}
if ((value.replace(/\s/g, '') === '') || (value === '0')) {
if (value.replace(/\s/g, '') === '' || value === '0') {
return verification(false, true);

@@ -21,0 +23,0 @@ }

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

'use strict';
var isString = require('lodash/lang/isString');

@@ -2,0 +4,0 @@ var maxYear = 19;

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

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

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

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

'use strict';
var expirationYear = require('./expiration-year');

@@ -2,0 +4,0 @@ var isArray = require('lodash/lang/isArray');

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

'use strict';
var isString = require('lodash/lang/isString');

@@ -2,0 +4,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