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

Function normalizeAuthorization

wxapp/fafa.js:61–67  ·  view source on GitHub ↗
(value = "")

Source from the content-addressed store, hash-verified

59}
60
61function normalizeAuthorization(value = "") {
62 const token = String(value || "").trim();
63 if (!token) return "";
64 if (/^bearer/i.test(token)) return token;
65 if (/^Bearer\s+/i.test(token)) return `bearer${token.replace(/^Bearer\s+/i, "")}`;
66 return `bearer${token}`;
67}
68
69function maskMobile(mobile = "") {
70 return String(mobile || "").replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2");

Callers 1

applyTokenMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected