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

Function short

wxapp/ztkd.js:42–46  ·  view source on GitHub ↗
(value, max = 320)

Source from the content-addressed store, hash-verified

40}
41
42function short(value, max = 320) {
43 if (value === undefined || value === null) return "";
44 const text = typeof value === "string" ? value : JSON.stringify(value);
45 return text.length > max ? `${text.slice(0, max)}...` : text;
46}
47
48function maskPhone(phone = "") {
49 return String(phone || "").replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2");

Callers 5

getWxCodeFunction · 0.70
apiMethod · 0.70
loginMethod · 0.70
queryPointsMethod · 0.70
signMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected