@@ -105,17 +105,17 @@ var NameParse = (function(){
105
105
NameParse . is_salutation = function ( word ) {
106
106
word = this . removeIgnoredChars ( word ) . toLowerCase ( ) ;
107
107
// returns normalized values
108
- if ( word == "mr" || word == "master" || word == "mister" ) {
108
+ if ( word === "mr" || word === "master" || word = == "mister" ) {
109
109
return "Mr." ;
110
- } else if ( word == "mrs" ) {
110
+ } else if ( word === "mrs" ) {
111
111
return "Mrs." ;
112
- } else if ( word == "miss" || word == "ms" ) {
112
+ } else if ( word === "miss" || word = == "ms" ) {
113
113
return "Ms." ;
114
- } else if ( word == "dr" ) {
114
+ } else if ( word === "dr" ) {
115
115
return "Dr." ;
116
- } else if ( word == "rev" ) {
116
+ } else if ( word === "rev" ) {
117
117
return "Rev." ;
118
- } else if ( word == "fr" ) {
118
+ } else if ( word === "fr" ) {
119
119
return "Fr." ;
120
120
} else {
121
121
return false ;
@@ -149,13 +149,13 @@ var NameParse = (function(){
149
149
word = word . toLowerCase ( ) ;
150
150
// these are some common prefixes that identify a compound last names - what am I missing?
151
151
var words = [ 'vere' , 'von' , 'van' , 'de' , 'del' , 'della' , 'di' , 'da' , 'pietro' , 'vanden' , 'du' , 'st.' , 'st' , 'la' , 'lo' , 'ter' ] ;
152
- return words . indexOf ( word ) >= 0 ;
152
+ return ( words . indexOf ( word ) >= 0 ) ;
153
153
} ;
154
154
155
155
// single letter, possibly followed by a period
156
156
NameParse . is_initial = function ( word ) {
157
157
word = this . removeIgnoredChars ( word ) ;
158
- return ( word . length == 1 ) ;
158
+ return ( word . length === 1 ) ;
159
159
} ;
160
160
161
161
// detect mixed case words like "McDonald"
@@ -183,7 +183,7 @@ var NameParse = (function(){
183
183
if ( this . is_camel_case ( thisWord ) ) {
184
184
return thisWord ;
185
185
} else {
186
- return thisWord . substr ( 0 , 1 ) . toUpperCase ( ) + thisWord . substr ( 1 ) . toLowerCase ( )
186
+ return thisWord . substr ( 0 , 1 ) . toUpperCase ( ) + thisWord . substr ( 1 ) . toLowerCase ( ) ;
187
187
}
188
188
} , this ) . join ( seperator ) ;
189
189
} ;
0 commit comments