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

Function getVariableRange

src/inject/dynamic-theme/variables.ts:634–643  ·  view source on GitHub ↗
(input: string, searchStart = 0)

Source from the content-addressed store, hash-verified

632}
633
634function getVariableRange(input: string, searchStart = 0): Range | null {
635 const start = input.indexOf('var(', searchStart);
636 if (start >= 0) {
637 const range = getParenthesesRange(input, start + 3);
638 if (range) {
639 return {start, end: range.end};
640 }
641 }
642 return null;
643}
644
645function getVariablesMatches(input: string): VariableMatch[] {
646 const ranges: VariableMatch[] = [];

Callers 1

getVariablesMatchesFunction · 0.85

Calls 1

getParenthesesRangeFunction · 0.90

Tested by

no test coverage detected