Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Commit

Permalink
v1.0.1 Downstream updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jun 28, 2017
1 parent 44f0825 commit 37a47b1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
6 changes: 5 additions & 1 deletion demo/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@
}
</style>
<link rel="stylesheet" href="../dist/politespace.css">
<!-- Load local jQuery, removing access to $ (use jQuery, not $). -->
<!-- Local jQuery -->
<!--<script src="../node_modules/jquery/dist/jquery.js"></script>-->
<!-- Cloud jQuery -->
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script>jQuery.noConflict()</script>
<!-- Cloud Shoestring -->
<!-- <script src="https://rawgit.com/filamentgroup/shoestring/master/dist/shoestring.js"></script>
<script>var jQuery = window.shoestring;</script> -->
<!-- Load local lib and tests. -->
<script src="../dist/politespace.js"></script>
<script src="../dist/politespace-init.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion dist/politespace-init.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! politespace - v1.0.0 - 2017-06-05
/*! politespace - v1.0.1 - 2017-06-28
Politely add spaces to input values to increase readability (credit card numbers, phone numbers, etc).
* https://github.com/filamentgroup/politespace
* Copyright (c) 2017 Filament Group (@filamentgroup)
Expand Down
2 changes: 1 addition & 1 deletion dist/politespace.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! politespace - v1.0.0 - 2017-06-05
/*! politespace - v1.0.1 - 2017-06-28
Politely add spaces to input values to increase readability (credit card numbers, phone numbers, etc).
* https://github.com/filamentgroup/politespace
* Copyright (c) 2017 Filament Group (@filamentgroup)
Expand Down
10 changes: 7 additions & 3 deletions dist/politespace.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! politespace - v1.0.0 - 2017-06-05
/*! politespace - v1.0.1 - 2017-06-28
Politely add spaces to input values to increase readability (credit card numbers, phone numbers, etc).
* https://github.com/filamentgroup/politespace
* Copyright (c) 2017 Filament Group (@filamentgroup)
Expand All @@ -12,7 +12,8 @@ Politely add spaces to input values to increase readability (credit card numbers
MASTERCARD: "MASTERCARD",
VISA: "VISA",
DISCOVER: "DISCOVER",
AMEX: "AMEX"
AMEX: "AMEX",
JCB: "JCB"
};

var types = {};
Expand All @@ -28,6 +29,9 @@ Politely add spaces to input values to increase readability (credit card numbers
// 34 or 37
types[ keys.AMEX ] = /^3[47]/;

// 35
types[ keys.JCB ] = /^35/;

function CreditableCardType( val ) {
for( var j in types ) {
if( !!val.match( types[ j ] ) ) {
Expand Down Expand Up @@ -317,7 +321,7 @@ Politely add spaces to input values to increase readability (credit card numbers
if( adjustMaxlength ) {
$t.attr( "maxlength", 15 );
}
} else if( type === "DISCOVER" || type === "VISA" || type === "MASTERCARD" ) {
} else if( type === "DISCOVER" || type === "VISA" || type === "MASTERCARD" || type === "JCB") {
pspace.setGroupLength( adjustMaxlength ? "4,4,4,4" : "4" );

if( adjustMaxlength ) {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "politespace",
"version": "1.0.0",
"version": "1.0.1",
"description": "Politely add spaces to input values to increase readability (credit card numbers, phone numbers, etc).",
"keywords": [
"grunt"
Expand All @@ -23,7 +23,8 @@
"test": "grunt test"
},
"dependencies": {
"jquery": "^3.0.0"
"jquery": "^3.0.0",
"creditable": "^1.0.10"
},
"devDependencies": {
"blanket": "~1.2.3",
Expand All @@ -43,8 +44,7 @@
"grunt-replace": "~1.0.1",
"load-grunt-tasks": "~3.5.0",
"matchdep": "~1.0.1",
"qunitjs": "^2.0.0",
"creditable": "^1.0.7"
"qunitjs": "^2.0.0"
},
"peerDependencies": {},
"engines": {
Expand Down

0 comments on commit 37a47b1

Please sign in to comment.