Skip to content

Theemo / @theemo/tokens / matchesConstrainedValue

Function: matchesConstrainedValue()

ts
function matchesConstrainedValue(value, constraints): boolean

Checks whether a token value matches the given constraint

Parameters

ParameterTypeDescription
valueunknownthe token value
constraintsPartial<FeatureConstraints & ScopeConstraint>the constraint

Returns

boolean

true if the constraint matches or false if not

Source

packages/@theemo/tokens/src/filters/matches-constrained-value.ts:42