(prefs: Record<string, unknown>)
| 100 | |
| 101 | /** Extract just the portable preference keys from a full prefs-like object. */ |
| 102 | export 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 |
no outgoing calls
no test coverage detected