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
+26
View File
@@ -0,0 +1,26 @@
/*
引数が空か
判定基準
文字列
長さが0の場合
配列
長さが0の場合
オブジェクト
keyが存在しない場合
それ以外
常にfalse
*/
function isEmpty(arg){
if(typeof arg==='string'){
return !arg.length;
}else if( Array.isArray(arg) ){
return !arg.length;
}else if(typeof arg==='object' && arg instanceof Object){
return !Object.getOwnPropertyNames(arg).length;
}else{
return false;
}
}
export default isEmpty;