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

Commit0663251

Browse files
committed
Update dist.
1 parent8341466 commit0663251

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

‎dist/utils.js‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,18 +2306,20 @@
23062306
},
23072307

23082308
isPrime:function(n){
2309-
if(n<=0||NumberUtil.isFloat(n)){
2309+
if(typeofn!=='number'||Number.isNaN(n)||NumberUtil.isFloat(n)){
23102310
returnfalse;
23112311
}
2312-
if(n===1){
2312+
if(n<=1){
23132313
returnfalse;
2314-
}elseif(n===2){
2314+
}
2315+
if(n<=3){
23152316
returntrue;
2316-
}elseif(n%2===0){
2317+
}
2318+
if(n%2===0||n%3===0){
23172319
returnfalse;
23182320
}
2319-
for(vari=3;i*i<=n;i+=2){
2320-
if(n%i===0){
2321+
for(vari=5;i*i<=n;i+=6){
2322+
if(n%i===0||n%(i+2)===0){
23212323
returnfalse;
23222324
}
23232325
}
@@ -3673,7 +3675,7 @@
36733675
xml:XMLUtil,
36743676
url:URLUtil,
36753677
utf8:UTF8Util,
3676-
version:'0.23.2',
3678+
version:'0.24.1',
36773679
};
36783680

36793681
returnutils;

‎dist/utils.min.js‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,11 +1542,12 @@
15421542
returnn>=0;
15431543
},
15441544
isPrime:function(n){
1545-
if(n<=0||p.isFloat(n))return!1;
1546-
if(1===n)return!1;
1547-
if(2===n)return!0;
1548-
if(n%2==0)return!1;
1549-
for(vart=3;t*t<=n;t+=2)if(n%t==0)return!1;
1545+
if('number'!=typeofn||Number.isNaN(n)||p.isFloat(n))return!1;
1546+
if(n<=1)return!1;
1547+
if(n<=3)return!0;
1548+
if(n%2==0||n%3==0)return!1;
1549+
for(vart=5;t*t<=n;t+=6)
1550+
if(n%t==0||n%(t+2)==0)return!1;
15501551
return!0;
15511552
},
15521553
}),
@@ -2637,7 +2638,7 @@
26372638
returnunescape(encodeURIComponent(n));
26382639
},
26392640
}),
2640-
version:'0.23.2',
2641+
version:'0.24.1',
26412642
}
26422643
);
26432644
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp