Convert variables inside %{} markers within strings to functions that return interpolated variables.
-
parseData(data, sourceData, templates, defaults, contextPath) ⇒
Object
-
Recursively replaces %{variable} references with functions Returns the transformed data object
-
parseString(string, sourceData, templates, defaults, contextPath) ⇒
Object
-
Recursively replace instances of %{somevariable} in a string Returns a string or a function that interpolates variables
-
interpolateVar(varName, sourceData, templates, defaults, contextPath) ⇒
Object
-
Given a variable name and source data, returns the closest matching value in source data, or an empty string
Recursively replaces %{variable} references with functions Returns the transformed data object
Kind: global function
Param | Type |
---|---|
data | Object |
sourceData | Object |
templates | Object |
defaults | Object |
contextPath | String |
Recursively replace instances of %{somevariable} in a string Returns a string or a function that interpolates variables
Kind: global function
Param | Type |
---|---|
string | String |
sourceData | Object |
templates | Object |
defaults | Object |
contextPath | String |
Given a variable name and source data, returns the closest matching value in source data, or an empty string
Kind: global function
Param | Type |
---|---|
varName | String |
sourceData | Object |
templates | Object |
defaults | Object |
contextPath | String |