Module data

Functions

to_data (value) ⚠️.


Functions

to_data (value)
⚠️. This function checks if the value has the __data() metamethod. If it has, the function replaces the value with the result of this metamethod. Otherwise, the function leaves it with no changes. Then this action is applied recursively to the elements of the value, if they exist (i.e., the value is a sequence or table). If the value is a table and has the __name metaproperty, then the result has the __name property with its value. Note that the __name metaproperty has a higher priority over the __name property and will override it.

Parameters:

  • value any

Returns:

    any
generated by LDoc 1.5.0 Last updated 2025-01-12 02:30:45