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

Function mask

wxapp/vipshop.js:65–70  ·  view source on GitHub ↗
(value = "")

Source from the content-addressed store, hash-verified

63}
64
65function mask(value = "") {
66 value = String(value || "");
67 if (!value) return "";
68 if (value.length <= 12) return `${value.slice(0, 3)}***`;
69 return `${value.slice(0, 6)}***${value.slice(-6)}`;
70}
71
72function sha1(text) {
73 return crypto.createHash("sha1").update(String(text)).digest("hex");

Callers 4

getVipWechatInfoMethod · 0.70
autoLoginMethod · 0.70
ensureLoginMethod · 0.70
runMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected