Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

payment

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

payment - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

2

bower.json
{
"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 @@

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