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

Function mask

wxapp/ctrip.js:74–79  ·  view source on GitHub ↗
(value = "")

Source from the content-addressed store, hash-verified

72}
73
74function mask(value = "") {
75 value = String(value);
76 if (!value) return "";
77 if (value.length <= 12) return `${value.slice(0, 3)}***`;
78 return `${value.slice(0, 6)}***${value.slice(-6)}`;
79}
80
81function parseJsonMaybe(text) {
82 if (!text || typeof text !== "string") return text;

Callers 1

loginMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected