card-validator
Advanced tools
Comparing version 2.2.4 to 2.2.5
@@ -0,1 +1,8 @@ | ||
2.2.5 | ||
===== | ||
- Fixes expiration date results when year is current year and month is invalid | ||
- Update files in `dist/` | ||
- Readme clarifications | ||
2.2.4 | ||
@@ -2,0 +9,0 @@ ===== |
@@ -1533,13 +1533,2 @@ !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){ | ||
function min(array) { | ||
var minimum = DEFAULT_LENGTH; | ||
var i = 0; | ||
for (; i < array.length; i++) { | ||
minimum = array[i] < minimum ? array[i] : minimum; | ||
} | ||
return minimum; | ||
} | ||
function max(array) { | ||
@@ -1567,3 +1556,3 @@ var maximum = DEFAULT_LENGTH; | ||
if (includes(maxLength, value.length)) { return verification(true, true); } | ||
if (value.length < min(maxLength)) { return verification(false, true); } | ||
if (value.length < Math.min.apply(null, maxLength)) { return verification(false, true); } | ||
if (value.length > max(maxLength)) { return verification(false, false); } | ||
@@ -1603,3 +1592,3 @@ | ||
if (yearValid.isValid) { | ||
if (monthValid.isValid) { | ||
if (yearValid.isCurrentYear) { | ||
@@ -1610,3 +1599,3 @@ isValidForThisYear = monthValid.isValidForThisYear; | ||
if (monthValid.isValid) { | ||
if (yearValid.isValid) { | ||
return verification(true, true, date.month, date.year); | ||
@@ -1732,8 +1721,15 @@ } | ||
},{}],47:[function(require,module,exports){ | ||
var expirationYear = require('./expiration-year'); | ||
var isArray = require('lodash/lang/isArray'); | ||
function parseDate(value) { | ||
var month, len; | ||
var month, len, year, yearValid; | ||
if (value.match('/')) { | ||
if (/\//.test(value)) { | ||
value = value.split(/\s*\/\s*/g); | ||
} else if (/\s/.test(value)) { | ||
value = value.split(/ +/g); | ||
} | ||
if (isArray(value)) { | ||
return { | ||
@@ -1745,3 +1741,12 @@ month: value[0], | ||
len = value[0] === '0' || value.length > 5 || value.length === 4 || value.length === 3 ? 2 : 1; | ||
len = value[0] === '0' || value.length > 5 ? 2 : 1; | ||
if (value[0] === '1') { | ||
year = value.substr(1); | ||
yearValid = expirationYear(year); | ||
if (!yearValid.isPotentiallyValid) { | ||
len = 2; | ||
} | ||
} | ||
month = value.substr(0, len); | ||
@@ -1751,3 +1756,3 @@ | ||
month: month, | ||
year: value.substr(month.length, 4) | ||
year: value.substr(month.length) | ||
}; | ||
@@ -1758,3 +1763,3 @@ } | ||
},{}],48:[function(require,module,exports){ | ||
},{"./expiration-year":45,"lodash/lang/isArray":31}],48:[function(require,module,exports){ | ||
var isString = require('lodash/lang/isString'); | ||
@@ -1761,0 +1766,0 @@ |
@@ -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(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(n){var e=t[a][1][n];return i(e?e:n)},u,u.exports,n,t,e,r)}return e[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);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"),o=[{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,a=[];if(!r(n))return a;if(""===n)return i(o);for(t=0;t<o.length;t++)e=o[t],RegExp(e.pattern).test(n)&&a.push(i(e));return a}},{"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=o(void 0===t?n.length-1:+t||0,0),function(){for(var e=arguments,r=-1,i=o(e.length-t,0),a=Array(i);++r<i;)a[r]=e[t+r];switch(t){case 0:return n.call(this,a);case 1:return n.call(this,e[0],a);case 2:return n.call(this,e[0],e[1],a)}var s=Array(t+1);for(r=-1;++r<t;)s[r]=e[r];return s[t]=a,n.apply(this,s)}}var i="Expected a function",o=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,o=i(t),a=o.length;++r<a;){var s=o[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,o(t),n)}var i=n("./baseCopy"),o=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 a(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?o:s)(n,function(i,o){j[o]=r(i,t,e,o,n,b,h)}),j}var i=n("./arrayCopy"),o=n("./arrayEach"),a=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]",F="[object Uint8Array]",P="[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[F]=D[P]=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 o=t[r];e[o]=n[o]}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,o)}var i=n("./baseFor"),o=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,o){return n.call(t,e,r,i,o)};case 5:return function(e,r,i,o,a){return n.call(t,e,r,i,o,a)}}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 a(function(t,e){var r=-1,a=null==t?0:e.length,s=a>2?e[a-2]:void 0,c=a>2?e[2]:void 0,l=a>1?e[a-1]:void 0;for("function"==typeof s?(s=i(s,l,5),a-=2):(s="function"==typeof l?l:void 0,a-=s?1:0),c&&o(e[0],e[1],c)&&(s=3>a?void 0:s,a=1);++r<a;){var u=e[r];u&&n(t,u,s)}return t})}var i=n("./bindCallback"),o=n("./isIterateeCall"),a=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 o=i(t),a=r(t),s=a.length,c=n?s:-1;n?c--:++c<s;){var l=a[c];if(e(o[l],l,o)===!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]&&o.call(n,"index")&&(e.index=n.index,e.input=n.input),e}var i=Object.prototype,o=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 o:case a: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"),o="[object Boolean]",a="[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&&o(i(n))}var i=n("./getLength"),o=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?o:t,n>-1&&n%1==0&&t>n}var i=/^\d+$/,o=9007199254740991;t.exports=r},{}],24:[function(n,t,e){function r(n,t,e){if(!a(e))return!1;var r=typeof t;if("number"==r?i(e)&&o(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"),o=n("./isIndex"),a=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)&&(o(n)||i(n)),f=-1,p=[];++f<e;){var g=t[f];(l&&a(g,r)||u.call(n,g))&&p.push(g)}return p}var i=n("../lang/isArguments"),o=n("../lang/isArray"),a=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,o(t,e,3)):i(n,!0)}var i=n("../internal/baseClone"),o=n("../internal/bindCallback");t.exports=r},{"../internal/baseClone":8,"../internal/bindCallback":13}],30:[function(n,t,e){function r(n){return o(n)&&i(n)&&s.call(n,"callee")&&!c.call(n,"callee")}var i=n("../internal/isArrayLike"),o=n("../internal/isObjectLike"),a=Object.prototype,s=a.hasOwnProperty,c=a.propertyIsEnumerable;t.exports=r},{"../internal/isArrayLike":22,"../internal/isObjectLike":26}],31:[function(n,t,e){var r=n("../internal/getNative"),i=n("../internal/isLength"),o=n("../internal/isObjectLike"),a="[object Array]",s=Object.prototype,c=s.toString,l=r(Array,"isArray"),u=l||function(n){return o(n)&&i(n.length)&&c.call(n)==a};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)==o}var i=n("./isObject"),o="[object Function]",a=Object.prototype,s=a.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)):o(n)&&a.test(n)}var i=n("./isFunction"),o=n("../internal/isObjectLike"),a=/^\[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)==o}var i=n("../internal/isObjectLike"),o="[object Number]",a=Object.prototype,s=a.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)==o}var i=n("../internal/isObjectLike"),o="[object String]",a=Object.prototype,s=a.toString;t.exports=r},{"../internal/isObjectLike":26}],37:[function(n,t,e){var r=n("../internal/assignWith"),i=n("../internal/baseAssign"),o=n("../internal/createAssigner"),a=o(function(n,t,e){return e?r(n,t,e):i(n,t)});t.exports=a},{"../internal/assignWith":6,"../internal/baseAssign":7,"../internal/createAssigner":15}],38:[function(n,t,e){var r=n("../internal/getNative"),i=n("../internal/isArrayLike"),o=n("../lang/isObject"),a=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)?a(n):o(n)?s(n):[]}:a;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)&&(o(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&&a(g,t)||"constructor"==g&&(l||!u.call(n,g))||f.push(g);return f}var i=n("../lang/isArguments"),o=n("../lang/isArray"),a=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 a({},{card:n,isPotentiallyValid:t,isValid:e})}function i(n){var t,e,i,a,u;if(l(n)&&(n=String(n)),!o(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],i="unionpay"===e.type?!0:s(n),a=0;a<e.lengths.length;a++)if(e.lengths[a]===n.length)return r(e,i,i);return u=Math.max.apply(null,e.lengths),n.length<u?r(e,!0,!1):r(e,!1,!1)}var o=n("lodash/lang/isString"),a=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=l,e=0;e<n.length;e++)t=n[e]<t?n[e]:t;return t}function o(n){for(var t=l,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 s(n,t){return t=t||l,t=t instanceof Array?t:[t],c(n)&&/^\d*$/.test(n)?r(t,n.length)?a(!0,!0):n.length<i(t)?a(!1,!0):n.length>o(t)?a(!1,!1):a(!0,!0):a(!1,!1)}var c=n("lodash/lang/isString"),l=3;t.exports=s},{"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=o(n),e=a(t.month),i=s(t.year),i.isValid){if(i.isCurrentYear)return l=e.isValidForThisYear,r(l,l,t.month,t.year);if(e.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 o=n("./parse-date"),a=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 o(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 o=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 o(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+a>=n):4===s&&(u=e===n,l=n>=e&&e+a>=n),r(l,l,u)))):r(!1,!1):r(!1,!1)}var o=n("lodash/lang/isString"),a=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;return n.match("/")?(n=n.split(/\s*\/\s*/g),{month:n[0],year:n.slice(1).join()}):(e="0"===n[0]||n.length>5||4===n.length||3===n.length?2:1,t=n.substr(0,e),{month:t,year:n.substr(t.length,4)})}t.exports=r},{}],48:[function(n,t,e){function r(n,t){return{isValid:n,isPotentiallyValid:t}}function i(n){return o(n)?n.length<4?r(!1,!0):r(!0,!0):r(!1,!1)}var o=n("lodash/lang/isString");t.exports=i},{"lodash/lang/isString":36}]},{},[1])(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;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],i="unionpay"===e.type?!0:s(n),o=0;o<e.lengths.length;o++)if(e.lengths[o]===n.length)return r(e,i,i);return u=Math.max.apply(null,e.lengths),n.length<u?r(e,!0,!1):r(e,!1,!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)}); |
{ | ||
"name": "card-validator", | ||
"version": "2.2.4", | ||
"version": "2.2.5", | ||
"description": "A library for validating credit card fields", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,3 +11,3 @@ # 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) | ||
You can install `card-validator` through `npm`. The npm module also includes the built, UMD bundle and its minified variant under `dist/` | ||
You can install `card-validator` through `npm`. The npm module also includes the built, UMD bundle and its minified variant under `dist/`. If you use the pre-built versions in the browser, the top-level function `cardValidator` is exposed. | ||
@@ -14,0 +14,0 @@ ``` |
@@ -27,3 +27,3 @@ var parseDate = require('./parse-date'); | ||
if (yearValid.isValid) { | ||
if (monthValid.isValid) { | ||
if (yearValid.isCurrentYear) { | ||
@@ -34,3 +34,3 @@ isValidForThisYear = monthValid.isValidForThisYear; | ||
if (monthValid.isValid) { | ||
if (yearValid.isValid) { | ||
return verification(true, true, date.month, date.year); | ||
@@ -37,0 +37,0 @@ } |
Sorry, the diff of this file is not supported yet
86966
1766