Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfbd2c68

Browse files
author
chenhui9279
committed
feat: require the use of=== and!==
1 parent29d5e43 commitfbd2c68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/ua-parser.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@
123123
q=props[p];
124124
// check if given property is actually array
125125
if(typeofq===OBJ_TYPE&&q.length>0){
126-
if(q.length==2){
126+
if(q.length===2){
127127
if(typeofq[1]==FUNC_TYPE){
128128
// assign modified match
129129
this[q[0]]=q[1].call(this,match);
130130
}else{
131131
// assign given value, ignore regex match
132132
this[q[0]]=q[1];
133133
}
134-
}elseif(q.length==3){
134+
}elseif(q.length===3){
135135
// check whether function or regex
136136
if(typeofq[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){
137137
// call function (usually string mapper)
@@ -140,7 +140,7 @@
140140
// sanitize match using given regex
141141
this[q[0]]=match ?match.replace(q[1],q[2]) :undefined;
142142
}
143-
}elseif(q.length==4){
143+
}elseif(q.length===4){
144144
this[q[0]]=match ?q[3].call(this,match.replace(q[1],q[2])) :undefined;
145145
}
146146
}else{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp