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

Function selector

packages/core/css/lib/parse/index.ts:194–208  ·  view source on GitHub ↗

* Parse selector.

()

Source from the content-addressed store, hash-verified

192 */
193
194 function selector() {
195 var m = match(/^([^{]+)/);
196 if (!m) return;
197 /* @fix Remove all comments from selectors
198 * http://ostermiller.org/findcomment.html */
199 return trim(m[0])
200 .replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, '')
201 .replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function (m) {
202 return m.replace(/,/g, '\u200C');
203 })
204 .split(/\s*(?![^(]*\)),\s*/)
205 .map(function (s) {
206 return s.replace(/\u200C/g, ',');
207 });
208 }
209
210 /**
211 * Parse declaration.

Callers 2

atpageFunction · 0.85
ruleFunction · 0.85

Calls 4

trimFunction · 0.85
replaceMethod · 0.80
matchFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected