This commit is contained in:
xiaozhiyong
2023-03-01 14:01:28 +08:00
parent 22c8d4d6dc
commit f9687b9e0f
4 changed files with 68 additions and 25 deletions

View File

@@ -52,7 +52,9 @@ export function isLicensePlate(no) {
return instance.test(no);
}
// 类型判断
export function typeJudgment(object) {
let res = {}.__proto__.toString.call(object);
return res ? res : "";
let type = /(?<= ).+(?=\])/.exec(res);
return type.length ? type[0] : "";
}