Prefix a variable name for use in a URL.


file.prefixVar(name string) string


name string

Name of the variable to have prefixed.


Prefix a variable name with a string unique to the file to be used in URL query parameters. Currently it has the form, but that may change in the future.

The purpose of prefixing variables is applying a namespace so that parameters can be passed to individual applications instead of all of them. This way there may be 2 instances of the same application on the same page without having conflicts.

It is guaranteed that calling .prefixVar() on different files will return different results. Think of addressing parameters to apps rendering contents on a page.


Basic example.

Documenting the prefix char.

Documenting the format with a regular expression.