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

Function fromAstNode

packages/core/ui/styling/css-selector.ts:807–812  ·  view source on GitHub ↗
(astRule: ReworkCSS.Rule)

Source from the content-addressed store, hash-verified

805}
806
807export function fromAstNode(astRule: ReworkCSS.Rule): RuleSet {
808 const declarations = astRule.declarations.filter(isDeclaration).map(createDeclaration);
809 const selectors = astRule.selectors.map(createSelector);
810
811 return new RuleSet(selectors, declarations);
812}
813
814function createDeclaration(decl: ReworkCSS.Declaration): any {
815 return { property: isCssVariable(decl.property) ? decl.property : decl.property.toLowerCase(), value: decl.value };

Callers 1

_populateRulesFunction · 0.90

Calls 2

mapMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected