first commit

This commit is contained in:
2025-10-10 18:00:07 -04:00
commit 06b59a3a99
3786 changed files with 571590 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
/*
SemVerな文字列かどうか
regexpを長々と繋げて頑張ると次弄るときに頭痛くなるから極力分割する
参考
[SemVerのv1.0.0とv2.0.0-rc.1、node-semverを見比べてみた - /var/log/kozy4324](http://kozy4324.github.io/blog/2012/12/19/semver/)
*/
function isSemVer(arg){
if( typeof arg!=='string'){
return false;
}
if( /^\d\.\d\.\d$/.test(arg) ){
return true;
}
if( /^\d\.\d\.\d-[0-9A-Za-z-.]*$/.test(arg) ){
return true;
}
}
export default isSemVer;