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

Function safeGet

jd_get_share_code.js:664–674  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

662}
663
664function safeGet(data) {
665 try {
666 if (typeof JSON.parse(data) == "object") {
667 return true;
668 }
669 } catch (e) {
670 console.log(e);
671 console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
672 return false;
673 }
674}
675function TotalBean() {
676 return new Promise(async resolve => {
677 const options = {

Callers 7

getJdFactoryFunction · 0.70
getJxFactoryFunction · 0.70
getJxNcFunction · 0.70
getTaskListFunction · 0.70
initForFarmFunction · 0.70
getJoyFunction · 0.70
getJdCashFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected