MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / parseRepeat

Function parseRepeat

packages/core/css/parser.ts:162–171  ·  view source on GitHub ↗
(value: string, start = 0, keyword = parseKeyword(value, start))

Source from the content-addressed store, hash-verified

160
161const backgroundRepeatKeywords = new Set(['repeat', 'repeat-x', 'repeat-y', 'no-repeat']);
162export function parseRepeat(value: string, start = 0, keyword = parseKeyword(value, start)): Parsed<BackgroundRepeat> {
163 if (keyword && backgroundRepeatKeywords.has(keyword.value)) {
164 const end = keyword.end;
165 const value = <BackgroundRepeat>keyword.value;
166
167 return { start, end, value };
168 }
169
170 return null;
171}
172
173const unitRegEx = /\s*([+\-]?(?:\d+\.\d+|\d+|\.\d+)(?:[eE][+\-]?\d+)?)([a-zA-Z]+|%)?\s*/gy;
174export function parseUnit(text: string, start = 0): Parsed<Unit<string>> {

Callers 1

parseBackgroundFunction · 0.85

Calls 1

parseKeywordFunction · 0.85

Tested by

no test coverage detected