Diff namespace
Methods
-
static diffAtRules(originalNodes, expectedNodes)
-
Compare at rules between lists of AST nodes.
Parameters:
Name Type Description originalNodes
Array.<ASTNode> Original nodes list.
expectedNodes
Array.<ASTNode> Expected nodes list.
-
static diffDeclarations(originalRule, expectedRule)
-
Compare declarations between rules.
Parameters:
Name Type Description originalRule
Rule Original rule.
expectedRule
Rule Expected rule.
-
static diffRules(originalNodes, expectedNodes)
-
Compare rules between lists of AST nodes.
Parameters:
Name Type Description originalNodes
Array.<ASTNode> Original nodes list.
expectedNodes
Array.<ASTNode> Expected nodes list.
-
static getDiffPartState(diffPart) → {number}
-
Get numeric state of a diff part.
Parameters:
Name Type Description diffPart
Diff.ArrayChange.<any> Diff part.
Returns:
number -
static transformDiffAtRules(original, expected)
-
Compare at rules and apply diff transformation.
Parameters:
Name Type Description original
Array.<AtRule> Original rules set.
expected
Array.<AtRule> Expected rules set.
-
static transformDiffDeclarations(originalRule, expectedRule) → {Rule}
-
Compare declarations between rules and apply diff transformation.
Parameters:
Name Type Description originalRule
Rule Original rule.
expectedRule
Rule Expected rule.
Returns:
Rule -
static transformDiffRules(original, expected)
-
Compare rules and apply diff transformation.
Parameters:
Name Type Description original
Array.<Rule> Original rules set.
expected
Array.<Rule> Expected rules set.