修改日志结束符判定

This commit is contained in:
whyour
2022-10-20 15:16:17 +08:00
parent 42c64c82d7
commit 4194f1964d
12 changed files with 36 additions and 16 deletions
+1
View File
@@ -0,0 +1 @@
export const LOG_END_SYMBOL = '\n          ';
+7
View File
@@ -1,3 +1,5 @@
import { LOG_END_SYMBOL } from "./const";
export default function browserType() {
// 权重:系统 + 系统版本 > 平台 > 内核 + 载体 + 内核版本 + 载体版本 > 外壳 + 外壳版本
const ua = navigator.userAgent.toLowerCase();
@@ -273,3 +275,8 @@ export function depthFirstSearch<
return c;
}
export function logEnded(log: string): boolean {
const endTips = [LOG_END_SYMBOL, '执行结束'];
return endTips.some(x => !log.includes(x));
}