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

Function safeGet

jd_live.js:315–325  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

313 })
314}
315function safeGet(data) {
316 try {
317 if (typeof JSON.parse(data) == "object") {
318 return true;
319 }
320 } catch (e) {
321 console.log(e);
322 console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
323 return false;
324 }
325}
326function jsonParse(str) {
327 if (typeof str == "string") {
328 try {

Callers 6

getTaskListFunction · 0.70
superTaskFunction · 0.70
viewTaskFunction · 0.70
shareTaskFunction · 0.70
awardTaskFunction · 0.70
signFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected