MCPcopy Index your code
hub / github.com/darkreader/darkreader / parseStaticThemes

Function parseStaticThemes

src/generators/static-theme.ts:222–233  ·  view source on GitHub ↗
($themes: string)

Source from the content-addressed store, hash-verified

220};
221
222export function parseStaticThemes($themes: string): StaticTheme[] {
223 return parseSitesFixesConfig<StaticTheme>($themes, {
224 commands: Object.keys(staticThemeCommands),
225 getCommandPropName: (command) => staticThemeCommands[command],
226 parseCommandValue: (command, value) => {
227 if (command === 'NO COMMON') {
228 return true;
229 }
230 return parseArray(value);
231 },
232 });
233}
234
235function camelCaseToUpperCase(text: string): string {
236 return text.replace(/([a-z])([A-Z])/g, '$1 $2').toUpperCase();

Callers 3

getStaticThemesTextMethod · 0.90
applyStaticThemesMethod · 0.90
config.tests.tsFile · 0.90

Calls 2

parseSitesFixesConfigFunction · 0.90
parseArrayFunction · 0.90

Tested by

no test coverage detected