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

Function short

wxapp/tclx_lc.js:26–30  ·  view source on GitHub ↗
(value, max = 220)

Source from the content-addressed store, hash-verified

24 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) MicroMessenger/3.9.12 MiniProgramEnv/Windows WindowsWechat/WMPF";
25
26function short(value, max = 220) {
27 if (value === undefined || value === null) return "";
28 const text = typeof value === "string" ? value : JSON.stringify(value);
29 return text.length > max ? `${text.slice(0, max)}...` : text;
30}
31
32function formatDate(date = new Date()) {
33 const pad = (n) => String(n).padStart(2, "0");

Callers 4

getWxCodeFunction · 0.70
loginMethod · 0.70
queryMethod · 0.70
signMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected