北斗启航科技教育平台登录系统
This commit is contained in:
12
src/utils/pointless.js
Normal file
12
src/utils/pointless.js
Normal file
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user