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

Function safeGet

jd_jdfactory.js:783–793  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

781 })
782}
783function safeGet(data) {
784 try {
785 if (typeof JSON.parse(data) == "object") {
786 return true;
787 }
788 } catch (e) {
789 console.log(e);
790 console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
791 return false;
792 }
793}
794function jsonParse(str) {
795 if (typeof str == "string") {
796 try {

Callers 9

algorithmFunction · 0.70
jdfactory_collectScoreFunction · 0.70
jdfactory_addEnergyFunction · 0.70
jdfactory_getTaskDetailFunction · 0.70
jdfactory_makeProductFunction · 0.70
queryVkComponentFunction · 0.70
jdfactory_getProductListFunction · 0.70
jdfactory_getHomeDataFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected