Skip to content

Commit c366065

Browse files
author
Kurtis LoVerde
committed
triple equals
1 parent ecbba30 commit c366065

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

jquery.restrictedtextfield.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
EVENT_VALIDATION_SUCCESS = "validationSuccess",
5353
EVENT_INPUT_IN_PROGRESS = "inputInProgress";
5454

55-
if( $.fn.restrictedTextField.types == undefined || $.fn.restrictedTextField.types == null ) {
55+
if( $.fn.restrictedTextField.types === undefined || $.fn.restrictedTextField.types === null ) {
5656
init();
5757
}
5858

@@ -62,7 +62,7 @@
6262
positiveFloat = /^[\.\d]$|^\.$|^\d*\.$/,
6363
negativeFloat = /^0\.?$|^-\.?$|^-\d*\.$/;
6464

65-
if( $.fn.restrictedTextField.types == undefined || $.fn.restrictedTextField.types == null ) {
65+
if( $.fn.restrictedTextField.types === undefined || $.fn.restrictedTextField.types === null ) {
6666
$.fn.restrictedTextField.types = [];
6767
}
6868

@@ -102,7 +102,7 @@
102102
var regexes = $.fn.restrictedTextField.types[ settings.type ];
103103

104104
if( isNothing(regexes) ) {
105-
if( $.fn.RestrictedTextFieldConfig.customTypes != undefined && $.fn.RestrictedTextFieldConfig.customTypes != null ) {
105+
if( $.fn.RestrictedTextFieldConfig.customTypes !== undefined && $.fn.RestrictedTextFieldConfig.customTypes !== null ) {
106106
regexes = $.fn.RestrictedTextFieldConfig.customTypes[ settings.type ];
107107
}
108108

@@ -153,13 +153,13 @@
153153
var jqThis = $( this );
154154

155155
// The user is entering data, but has yet to reach the minimum number of characters needed to satisfy
156-
// the regular expression in $.fn.restrictedTextField.types. We can't check against that yet because
157-
// it would result in the user being unable to enter anything. Until we've reached the minimum number
158-
// of required characters, allow the user to input any character which would satisfy the regular
156+
// the regular expression in regexes.fullRegex. We can't check against that yet because it would
157+
// result in the user being unable to enter anything. Until we've reached the minimum number of
158+
// required characters, allow the user to input any character which would satisfy the regular
159159
// expression. If we've reached the minimum required number of characters, perform the validation
160-
// against the regular expression in $.fn.restrictedTextField.types.
160+
// against the regular expression in regexes.fullRegex.
161161

162-
if( regexes.partialRegex != undefined && regexes.partialRegex != null ) {
162+
if( regexes.partialRegex !== undefined && regexes.partialRegex !== null ) {
163163
if( regexes.partialRegex.test(this.value) ) {
164164
jqThis.trigger( EVENT_INPUT_IN_PROGRESS );
165165
} else {
@@ -177,7 +177,7 @@
177177
};
178178

179179
function isNothing( value ) {
180-
return value == undefined || value == null || value.length < 1;
180+
return value === undefined || value === null || value.length < 1;
181181
}
182182

183183
function isClassName( obj, className ) {

jquery.restrictedtextfield.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)