MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / short

Function short

wxapp/skyworth.js:43–47  ·  view source on GitHub ↗
(value, max = 500)

Source from the content-addressed store, hash-verified

41}
42
43function short(value, max = 500) {
44 if (value === undefined || value === null) return "";
45 const text = typeof value === "string" ? value : JSON.stringify(value);
46 return text.length > max ? `${text.slice(0, max)}...` : text;
47}
48
49function mask(value = "") {
50 value = String(value || "");

Callers 4

getWxCodeFunction · 0.70
apiMethod · 0.70
assertOkMethod · 0.70
loginMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected