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

Function writeTokenCache

wxapp/gujiajiaju.js:53–59  ·  view source on GitHub ↗
(cache)

Source from the content-addressed store, hash-verified

51}
52
53function writeTokenCache(cache) {
54 try {
55 fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8");
56 } catch (e) {
57 $.log(`写入token缓存失败: ${e.message || e}`);
58 }
59}
60
61function isObject(val) {
62 return Object.prototype.toString.call(val) === "[object Object]";

Callers 2

saveCachedTokenMethod · 0.70
clearCachedTokenMethod · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected