🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

creditable

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

creditable - npm Package Compare versions

Comparing version

to
1.0.5

19

creditablesecuritycode.js

@@ -18,12 +18,17 @@ // Input a credit card number string, returns a key signifying the type of credit card it is

this.$creditCard.on( "change", function() {
var maxlen = self.getMaxlength();
if( maxlen ) {
self.$el.attr( "maxlength", maxlen );
} else {
self.$el.removeAttr( "maxlength" );
}
self.$el.attr( "placeholder", self.getPlaceholder( maxlen || 4 ) );
self.updateSecurityCode();
});
this.updateSecurityCode();
}
CreditableSecurityCode.prototype.updateSecurityCode = function() {
var maxlen = this.getMaxlength();
if( maxlen ) {
this.$el.attr( "maxlength", maxlen );
} else {
this.$el.removeAttr( "maxlength" );
}
this.$el.attr( "placeholder", this.getPlaceholder( maxlen || 4 ) );
};
CreditableSecurityCode.prototype.getMaxlength = function() {

@@ -30,0 +35,0 @@ return lengths[ CreditableCardType( this.$creditCard.val() ) ];

{
"name": "creditable",
"version": "1.0.4",
"version": "1.0.5",
"description": "Utilities for working with credit card form input.",

@@ -5,0 +5,0 @@ "main": "creditablecardtype.js",

Sorry, the diff of this file is not supported yet