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

Function createSelector

packages/core/ui/styling/css-selector.ts:936–947  ·  view source on GitHub ↗
(sel: string)

Source from the content-addressed store, hash-verified

934}
935
936export function createSelector(sel: string): SimpleSelector | SimpleSelectorSequence | ComplexSelector {
937 try {
938 const result = convertToCSSWhatSelector(sel);
939 if (!result?.length) {
940 return new InvalidSelector(new Error('Empty selector'));
941 }
942
943 return createSelectorFromAst(result[0]);
944 } catch (e) {
945 return new InvalidSelector(e);
946 }
947}
948
949function isDeclaration(node: ReworkCSS.Node): node is ReworkCSS.Declaration {
950 return node.type === 'declaration';

Callers 1

Calls 1

createSelectorFromAstFunction · 0.85

Tested by

no test coverage detected