new SortAndMerge()
Internal state initializer.
To apply transformer use SortAndMerge.transform(el) instead.
Methods
-
atRule(el, i, parentChildren, cbnullable)
-
At rule transformer.
Parameters:
Name Type Attributes Description elAtRule Element.
inumber Element index.
parentChildrenArray.<ASTNode> Element's parent children list.
cbfunction <nullable>
Callback.
-
declaration(el, i, parentChildren, cbnullable)
-
Declaration transformer.
Parameters:
Name Type Attributes Description elDeclaration Element.
inumber Element index.
parentChildrenArray.<ASTNode> Element's parent children list.
cbfunction <nullable>
Callback.
-
root(el, inullable, parentChildrennullable, cbnullable)
-
Root node transformer.
Parameters:
Name Type Attributes Description elArray.<Rule> Root element.
inumber <nullable>
Root element index if any.
parentChildrenArray.<ASTNode> <nullable>
Children of root element parent if there is any parent.
cbfunction <nullable>
Callback.
-
rule(el, i, parentChildren, cbnullable)
-
Rule transformer.
Parameters:
Name Type Attributes Description elRule Element.
inumber Element index.
parentChildrenArray.<ASTNode> Element's parent children list.
cbfunction <nullable>
Callback.