Home > @uniformdev/canvas > parseVariableExpression
parseVariableExpression() function
Parses an expression that may contain Uniform variables and invokes a callback for each text or variable token found
Signature:
Parameters
Parameter | Type | Description |
---|---|---|
serialized | string | |
onToken | (token: string, type: 'text' | 'variable') => void | false | (Optional) |
Returns:
number
the number of tokens found in the string (variable or text)