Get variable value
variable.get(options?)
Retrieves the value of the variable.
Syntax
Parameters
-
options: object - An optional parameter to include get specific information.
Calling variable.get()
without customValues: true
will throw an error if the variable has a custom value.
Returns
Returns a Promise that resolves to the current value of the variable. The exact return type depends on the variable’s type, whether it’s an alias or a custom value, and the selected variable mode.
See the table below for details on return types for each scenario.
Color
Size
Number & Percentage
FontFamily
Returns a value in one of these formats:
Example
Designer ability
Checks for Authorization only