Rename a property on a thing.
While almost all functions on things are also available on Type instances, this one is not. This is because a Type instance has a fixed set of properties and so you are not allowed to rename one of them on a single instance. Use mod_type() instead, to rename the property on all instances if this is what you want.
This function generates a change.
thing.ren(old, new)
Argument | Type | Description |
---|---|---|
old | str (required) | Name of the property to rename. |
new | str (required) | New name of the property. |
Returns nil
.
This code shows some return values for ren():
.x = 42;
.ren('x', 'y'); // rename .x to .y
Return value in JSON format
null