Comparing version 2.0.3 to 2.1.0
{ | ||
"name": "payment", | ||
"version": "2.0.0-beta1", | ||
"version": "2.1.0", | ||
"main": "lib/payment.js" | ||
} |
@@ -498,5 +498,7 @@ var payment = | ||
validateCardExpiry: function(month, year) { | ||
var currentTime, expiry, prefix, ref; | ||
var currentTime, expiry, prefix, ref, ref1; | ||
if (typeof month === 'object' && 'month' in month) { | ||
ref = month, month = ref.month, year = ref.year; | ||
} else if (typeof month === 'string' && indexOf.call(month, '/') >= 0) { | ||
ref1 = Payment.fns.cardExpiryVal(month), month = ref1.month, year = ref1.year; | ||
} | ||
@@ -503,0 +505,0 @@ if (!(month && year)) { |
@@ -453,5 +453,7 @@ // Generated by CoffeeScript 1.10.0 | ||
validateCardExpiry: function(month, year) { | ||
var currentTime, expiry, prefix, ref; | ||
var currentTime, expiry, prefix, ref, ref1; | ||
if (typeof month === 'object' && 'month' in month) { | ||
ref = month, month = ref.month, year = ref.year; | ||
} else if (typeof month === 'string' && indexOf.call(month, '/') >= 0) { | ||
ref1 = Payment.fns.cardExpiryVal(month), month = ref1.month, year = ref1.year; | ||
} | ||
@@ -458,0 +460,0 @@ if (!(month && year)) { |
{ | ||
"name": "payment", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "A general purpose library for building credit card forms, validating inputs and formatting numbers. Base on jquery.payment by @stripe, but without the jQuery.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -104,3 +104,3 @@ # Payment [![Build Status](https://travis-ci.org/jessepollak/payment.svg?branch=master)](https://travis-ci.org/jessepollak/payment) | ||
### Payment.fns.validateCardExpiry(month, year) | ||
### Payment.fns.validateCardExpiry(month, year), Payment.fns.validateCardExpiry('month / year') | ||
@@ -112,2 +112,3 @@ Validates a card expiry: | ||
* Supports year shorthand | ||
* Supports formatted as `formatCardExpiry` input value | ||
@@ -120,2 +121,4 @@ Example: | ||
Payment.fns.validateCardExpiry('05', '05'); //=> false | ||
Payment.fns.validateCardExpiry('05 / 25'); //=> true | ||
Payment.fns.validateCardExpiry('05 / 2015'); //=> false | ||
``` | ||
@@ -122,0 +125,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52123
1451
234