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

Function writeTokenCache

wxapp/aiguoyue.js:42–48  ·  view source on GitHub ↗
(cache)

Source from the content-addressed store, hash-verified

40}
41
42function writeTokenCache(cache) {
43 try {
44 fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8");
45 } catch (e) {
46 $.log(`写入token缓存失败: ${e.message || e}`);
47 }
48}
49
50function maskPhone(phone = "") {
51 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