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

Function maskToken

wxapp/nestle.js:45–49  ·  view source on GitHub ↗
(token = "")

Source from the content-addressed store, hash-verified

43}
44
45function maskToken(token = "") {
46 const value = String(token || "");
47 if (!value) return "";
48 return value.length > 20 ? `${value.slice(0, 12)}***${value.slice(-8)}` : `${value.slice(0, 6)}***`;
49}
50
51function maskPhone(phone = "") {
52 return String(phone || "").replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2");

Callers 1

loginMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected