MCPcopy Create free account
hub / github.com/darkreader/darkreader / isValidPresetTheme

Function isValidPresetTheme

src/utils/validation.ts:98–104  ·  view source on GitHub ↗
(theme: Theme)

Source from the content-addressed store, hash-verified

96
97 const {validateProperty, validateArray, errors} = createValidator();
98 const isValidPresetTheme = (theme: Theme) => {
99 if (!isPlainObject(theme)) {
100 return false;
101 }
102 const {errors: themeErrors} = validateTheme(theme);
103 return themeErrors.length === 0;
104 };
105
106 validateProperty(settings, 'schemeVersion', isNumber, DEFAULT_SETTINGS);
107

Callers

nothing calls this directly

Calls 2

isPlainObjectFunction · 0.85
validateThemeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…