MCPcopy Create free account
hub / github.com/Tencent/CodeAnalysis / getMetaEnv

Function getMetaEnv

web/packages/framework/src/utils/index.ts:56–59  ·  view source on GitHub ↗
(key: string, defaultValue = '')

Source from the content-addressed store, hash-verified

54 * @param defaultValue
55 */
56export const getMetaEnv = (key: string, defaultValue = '') => {
57 const meta = document.querySelector(`meta[name=${key}]`) as HTMLMetaElement;
58 return meta && !isEmpty(meta.content) ? meta.content : defaultValue;
59};
60
61/**
62 * 获取LocalStorage name对应值

Callers 5

setting.tsFile · 0.90
api.tsFile · 0.90
changeThemeModeFunction · 0.90
index.tsxFile · 0.90
index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected