Transformers
Last updated
Was this helpful?
Last updated
Was this helpful?
Sometimes the data coming from the design data model is not in a format you'd like it to have. For example, you want the uppercased name of the token, but the data model only provides a real name. For this situation, it is also possible to change attributes using transformers. Transformers take an input value, run it through transformation, and retrieve the result. You use them through dot notation:
Producing this expected output when used:
Transformers can also be chained, like this:
Which will transform the value using all transformers from left to right, producing:
There are a plethora of transformers available for each supported data type. Note that transformers can only be used on the data type they are listed under. For example, uppercased()
can only be used on string
values while random()
can be used on arrays.
Following are available:
Support transformers are special because can be used on any data type.
Following are available:
Following are available:
Following are available:
Following are available: