getKeyValue
Get a global environment variable by name.
globals.getKeyValue(key)
Returns the current value at key
. If no value has been set, it will return the default value (if it is not a function). If the default value is a function, it will return the output of the function. This execution is cached if the cache flag was set on initialization.
globals.define('foo', 'bar');
globals.getKeyValue('foo'); //-> 'bar'
Parameters
- key
{String}
:The key value to access.
Returns
{*}
:
Returns the value of a given key.