MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / asyncValue

Method asyncValue

src/pkg/config/config.ts:404–408  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

402 return this._get<string>("language", {
403 // 取预设值时呼叫 asyncValue 进行异步取值
404 asyncValue() {
405 return matchLanguage().then((matchLanguageRes) => {
406 return matchLanguageRes || chrome.i18n.getUILanguage();
407 });
408 },
409 }).then((lng) => {
410 // 设置进入缓存
411 if (globalThis.localStorage) {

Callers 1

resolveDefaultMethod · 0.80

Calls 2

matchLanguageFunction · 0.90
getUILanguageMethod · 0.80

Tested by

no test coverage detected