Skip to main content


Scripts can define functions that can be invoked with arguments. The first parameter is the name of the function, and the last is the body of the function. Parameters in between are function parameters.

Hello {$param1}!
{my_function} // outputs the users ID

Imporing scripts with functions will make those functions available to the script.


Returning values

{return} can be used in functions to return values. This is important for some functions that have to return rich data, as there can be issues with the data returned unless you explicitly use {return}.

This will be discarded as return is used.
"title": "My Title"

{$data.title} // "My Title"

In this example, without {return}, the function would include the string "This will be discarded as return is used" with the object appended.

Even without the string, the object would be destroyed because during parsing the spaces in the body of the function are included. This may be changed in the future.