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 el
AtRule Element.
i
number Element index.
parentChildren
Array.<ASTNode> Element's parent children list.
cb
function <nullable>
Callback.
-
declaration(el, i, parentChildren, cbnullable)
-
Declaration transformer.
Parameters:
Name Type Attributes Description el
Declaration Element.
i
number Element index.
parentChildren
Array.<ASTNode> Element's parent children list.
cb
function <nullable>
Callback.
-
root(el, inullable, parentChildrennullable, cbnullable)
-
Root node transformer.
Parameters:
Name Type Attributes Description el
Array.<Rule> Root element.
i
number <nullable>
Root element index if any.
parentChildren
Array.<ASTNode> <nullable>
Children of root element parent if there is any parent.
cb
function <nullable>
Callback.
-
rule(el, i, parentChildren, cbnullable)
-
Rule transformer.
Parameters:
Name Type Attributes Description el
Rule Element.
i
number Element index.
parentChildren
Array.<ASTNode> Element's parent children list.
cb
function <nullable>
Callback.