Returns a value located in the provided path using the given mVariables
object.
If the provided path cannot be resolved completely, undefined
is returned.
How mVariables
are checked for resolving the path depends on the syntax of the path:
mVariables
.mVariables["."]
and don't fallback to global scope window
.mOptions.preferDotContext=true
, paths not starting with a dot ('.') are first checked through the dot Variable mVariables["."]
and then - if nothing is found - through the other Variables in mVariables
and eventually fallback to global scope window
.When the resolved value is a function, a context may be bound to it with the following conditions:
mVariables
, it's not bound to any context. If the function exists directly under mVariables
, nothing is bound.false
, no context is bound to the resolved function regardless where the function is resolved mOptions.bindDotContext=false
turns off the automatic binding to the dot variable mVariables["."]
. mOptions.bindDotContext
has no effect when mOptions.bindContext=false
.Param | Type | Default Value | Description |
---|---|---|---|
sPath | string | Path | |
mVariables? | object | An object containing the mapping of variable name to object or function | |
mOptions? | object | Options |
Method | Description |
---|