MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / tomlKey

Function tomlKey

apps/desktop/src/main/app-config.ts:371–375  ·  view source on GitHub ↗

Bare key when it's a simple identifier, otherwise a quoted key (e.g. a * KeymapId like "global.searchNotes" or a "status:todo" column id).

(key: string)

Source from the content-addressed store, hash-verified

369/** Bare key when it's a simple identifier, otherwise a quoted key (e.g. a
370 * KeymapId like "global.searchNotes" or a "status:todo" column id). */
371function tomlKey(key: string): string {
372 return /^[A-Za-z0-9_-]+$/.test(key)
373 ? key
374 : `"${key.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`
375}
376
377/**
378 * Build the TOML document text from a portable config object. Always emits

Callers 2

serializeConfigFunction · 0.85
keymapSectionLinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected