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

Function pickPortablePrefs

packages/shared-domain/src/app-config.ts:102–110  ·  view source on GitHub ↗
(prefs: Record<string, unknown>)

Source from the content-addressed store, hash-verified

100
101/** Extract just the portable preference keys from a full prefs-like object. */
102export function pickPortablePrefs(prefs: Record<string, unknown>): AppConfigPortable {
103 const out: AppConfigPortable = {}
104 for (const key of PORTABLE_PREF_KEYS) {
105 if (Object.prototype.hasOwnProperty.call(prefs, key)) {
106 out[key] = prefs[key]
107 }
108 }
109 return out
110}
111
112/**
113 * Default value for every portable preference. The config writer fills any

Callers 2

pushPortableConfigFunction · 0.90
initConfigSyncFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected