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

Function safeGet

jd_kd.js:190–200  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

188 })
189}
190function safeGet(data) {
191 try {
192 if (typeof JSON.parse(data) == "object") {
193 return true;
194 }
195 } catch (e) {
196 console.log(e);
197 console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
198 return false;
199 }
200}
201function jsonParse(str) {
202 if (typeof str == "string") {
203 try {

Callers 1

userSignInFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected