MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / getPrefixedSettings

Function getPrefixedSettings

frontend/util/util.ts:317–328  ·  view source on GitHub ↗
(settings: SettingsType, prefix: string)

Source from the content-addressed store, hash-verified

315}
316
317function getPrefixedSettings(settings: SettingsType, prefix: string): SettingsType {
318 const rtn: SettingsType = {};
319 if (settings == null || isBlank(prefix)) {
320 return rtn;
321 }
322 for (const key in settings) {
323 if (key == prefix || key.startsWith(prefix + ":")) {
324 rtn[key] = settings[key];
325 }
326 }
327 return rtn;
328}
329
330function countGraphemes(str: string): number {
331 if (str == null) {

Callers 1

getSettingsPrefixAtomFunction · 0.90

Calls 1

isBlankFunction · 0.70

Tested by

no test coverage detected