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

Function safeGet

activity/jd_global.js:469–479  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

467}
468
469function safeGet(data) {
470 try {
471 if (typeof JSON.parse(data) == "object") {
472 return true;
473 }
474 } catch (e) {
475 console.log(e);
476 console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
477 return false;
478 }
479}
480
481function jsonParse(str) {
482 if (typeof str == "string") {

Callers 5

getHomeFunction · 0.70
getTaskFunction · 0.70
doTaskFunction · 0.70
helpFriendFunction · 0.70
receiveRewardFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected