Skip to content

script.environment ​

Returns the environment the MODLR instance runs in, in lower case, such as production or development.

js
script.environment()

Returns ​

string

The environment's name.

Examples ​

js
if (script.environment() == "production") {
    // do something only in production environment.
}