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

Function short

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

Source from the content-addressed store, hash-verified

44}
45
46function short(value, max = 320) {
47 if (value === undefined || value === null) return "";
48 const text = typeof value === "string" ? value : JSON.stringify(value);
49 return text.length > max ? `${text.slice(0, max)}...` : text;
50}
51
52function md5(value) {
53 return crypto.createHash("md5").update(String(value)).digest("hex");

Callers 5

getWxCodeFunction · 0.70
miniLoginMethod · 0.70
queryUserMethod · 0.70
mapApiMethod · 0.70
checkinMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected