12 lines
419 B
JavaScript
12 lines
419 B
JavaScript
export const pointless = (authtext) => {
|
||
// 定义一个包含所有非法值的数组
|
||
var invalidValues = ["", null, "null", "Null", NaN, "NaN", "nan", undefined, "undefined", " ", '\s'];
|
||
|
||
// 检查NaN,因为NaN不等于自身,需要特殊处理
|
||
if (isNaN(authtext)) {
|
||
return false;
|
||
}
|
||
|
||
// 检查authtext是否在invalidValues数组中
|
||
return !invalidValues.includes(authtext);
|
||
} |