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

Function writeTokenCache

wxapp/mfd.js:51–57  ·  view source on GitHub ↗
(cache)

Source from the content-addressed store, hash-verified

49}
50
51function writeTokenCache(cache) {
52 try {
53 fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8");
54 } catch (e) {
55 $.log(`写入token缓存失败: ${e.message || e}`);
56 }
57}
58
59function maskPhone(phone = "") {
60 return String(phone).replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2");

Callers 2

saveCachedTokenMethod · 0.70
removeCachedTokenMethod · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected