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

Function safeGet

jd_jdzz.js:385–395  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

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

Callers 3

getUserInfoFunction · 0.70
getTaskListFunction · 0.70
doTaskFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected