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

Function safeGet

jd_ms.js:304–314  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

302}
303
304function safeGet(data) {
305 try {
306 if (typeof JSON.parse(data) == "object") {
307 return true;
308 }
309 } catch (e) {
310 console.log(e);
311 console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
312 return false;
313 }
314}
315
316function jsonParse(str) {
317 if (typeof str == "string") {

Callers 4

getActInfoFunction · 0.70
getUserInfoFunction · 0.70
getTaskListFunction · 0.70
doTaskFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected