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

Function short

wxapp/vipshop.js:59–63  ·  view source on GitHub ↗
(value, max = 600)

Source from the content-addressed store, hash-verified

57}
58
59function short(value, max = 600) {
60 if (value === undefined || value === null) return "";
61 const text = typeof value === "string" ? value : JSON.stringify(value);
62 return text.length > max ? `${text.slice(0, max)}...` : text;
63}
64
65function mask(value = "") {
66 value = String(value || "");

Callers 5

getWxCodeFunction · 0.70
getVipWechatInfoMethod · 0.70
autoLoginMethod · 0.70
signInfoMethod · 0.70
signMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected