MCPcopy Create free account
hub / github.com/Semporia/Scripts / safeGet

Function safeGet

jd_mcxhd.js:391–401  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

389}
390
391function safeGet(data) {
392 try {
393 if (typeof JSON.parse(data) == "object") {
394 return true;
395 }
396 } catch (e) {
397 console.log(e);
398 console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
399 return false;
400 }
401}
402
403function jsonParse(str) {
404 if (typeof str == "string") {

Callers 7

doTaskFunction · 0.70
queryTaskFunction · 0.70
viewTaskFunction · 0.70
checkTaskFunction · 0.70
taskListFunction · 0.70
startGameFunction · 0.70
reportGameFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected