mirror of
https://github.com/Gongxh0901/kunpolibrary
synced 2025-11-05 05:45:48 +00:00
热更新工具修改
This commit is contained in:
@@ -36,4 +36,15 @@ export class Utils {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断传入的字符串是否是json格式的字符串
|
||||
*/
|
||||
public static isJsonString(str: string): boolean {
|
||||
try {
|
||||
JSON.parse(str);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user