MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / shortJson

Function shortJson

wxapp/junpinhui.js:97–101  ·  view source on GitHub ↗
(value, limit = 180)

Source from the content-addressed store, hash-verified

95}
96
97function shortJson(value, limit = 180) {
98 const text = typeof value === "string" ? value : JSON.stringify(value);
99 if (!text) return "";
100 return text.length > limit ? `${text.slice(0, limit)}...` : text;
101}
102
103function okCode(res) {
104 return String(res?.code) === "10000" || res?.success === true || Number(res?.err) === 0;

Callers 11

assertOkFunction · 0.85
dailySignMethod · 0.85
harvestFarmMethod · 0.85
seedFarmMethod · 0.85
waterFarmMethod · 0.85
manureFarmMethod · 0.85
doShareTaskMethod · 0.85
doQuestionTaskMethod · 0.85
doRealityTaskMethod · 0.85
doCompleteInfoTaskMethod · 0.85
doSubscribePrizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected