File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 123
123
q = props [ p ] ;
124
124
// check if given property is actually array
125
125
if ( typeof q === OBJ_TYPE && q . length > 0 ) {
126
- if ( q . length == 2 ) {
126
+ if ( q . length === 2 ) {
127
127
if ( typeof q [ 1 ] == FUNC_TYPE ) {
128
128
// assign modified match
129
129
this [ q [ 0 ] ] = q [ 1 ] . call ( this , match ) ;
130
130
} else {
131
131
// assign given value, ignore regex match
132
132
this [ q [ 0 ] ] = q [ 1 ] ;
133
133
}
134
- } else if ( q . length == 3 ) {
134
+ } else if ( q . length === 3 ) {
135
135
// check whether function or regex
136
136
if ( typeof q [ 1 ] === FUNC_TYPE && ! ( q [ 1 ] . exec && q [ 1 ] . test ) ) {
137
137
// call function (usually string mapper)
140
140
// sanitize match using given regex
141
141
this [ q [ 0 ] ] = match ? match . replace ( q [ 1 ] , q [ 2 ] ) : undefined ;
142
142
}
143
- } else if ( q . length == 4 ) {
143
+ } else if ( q . length === 4 ) {
144
144
this [ q [ 0 ] ] = match ? q [ 3 ] . call ( this , match . replace ( q [ 1 ] , q [ 2 ] ) ) : undefined ;
145
145
}
146
146
} else {
You can’t perform that action at this time.
0 commit comments