Home > @lynx-js/rspeedy > Source > define
The define
options is used to define some values or expressions at compile time.
Signature:
If the value provided is a string, it will be utilized as a code fragment.
If the value provided is an object, all its keys will be defined in the same manner.
If the value isn't a string, it will be stringified, with functions included.
Notably, if a typeof
prefix is attached to the key, it will be exclusively defined for typeof
calls."
Using define
for environment variables.
Expressions will be replaced with the corresponding code fragments:
Using define
for typeof
.
The typeof
expressions will be replaced with the corresponding code fragments:
Using define
with objects.
Expressions will be replaced with the corresponding code fragments: