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

Function safeGet

jd_pk.js:717–727  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

715
716
717function safeGet(data) {
718 try {
719 if (typeof JSON.parse(data) == "object") {
720 return true;
721 }
722 } catch (e) {
723 console.log(e);
724 console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
725 return false;
726 }
727}
728
729function jsonParse(str) {
730 if (typeof str == "string") {

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected