UNPKG

mode-watcher

Version:

SSR-friendly light and dark mode for SvelteKit

12 lines (11 loc) 348 B
/** * Sanitizes an array of classnames by removing any empty strings. */ export function sanitizeClassNames(classNames) { return classNames.filter((className) => className.length > 0); } export const noopStorage = { getItem: (_key) => null, setItem: (_key, _value) => { }, }; export const isBrowser = typeof document !== "undefined";