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

Function customThemeSupportsMode

packages/shared-domain/src/custom-themes.ts:231–236  ·  view source on GitHub ↗
(
  theme: Pick<CustomTheme, 'modes'>,
  mode: CustomThemeMode
)

Source from the content-addressed store, hash-verified

229
230/** Whether a theme provides the given mode (single-mode themes pin their one). */
231export function customThemeSupportsMode(
232 theme: Pick<CustomTheme, 'modes'>,
233 mode: CustomThemeMode
234): boolean {
235 return theme.modes === 'both' || theme.modes === mode
236}
237
238const asString = (v: unknown): string | undefined =>
239 typeof v === 'string' && v.trim() ? v.trim() : undefined

Callers 2

pickModeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected