MCPcopy
hub / github.com/marcj/css-element-queries / extractQuery

Function extractQuery

src/ElementQueries.js:345–357  ·  view source on GitHub ↗

* @param {String} css

(css)

Source from the content-addressed store, hash-verified

343 * @param {String} css
344 */
345 function extractQuery(css) {
346 var match, smatch, attrs, attrMatch;
347
348 css = css.replace(/'/g, '"');
349 while (null !== (match = regex.exec(css))) {
350 smatch = match[1] + match[3];
351 attrs = match[2];
352
353 while (null !== (attrMatch = attrRegex.exec(attrs))) {
354 queueQuery(smatch, attrMatch[1], attrMatch[2], attrMatch[3]);
355 }
356 }
357 }
358
359 /**
360 * @param {CssRule[]|String} rules

Callers 1

readRulesFunction · 0.85

Calls 1

queueQueryFunction · 0.85

Tested by

no test coverage detected