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

Function safeGet

activity/jd_apple_live.js:394–404  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

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

Callers 3

jdapple_collectScoreFunction · 0.70
jdapple_getLotteryFunction · 0.70
jdapple_getTaskDetailFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected