MCPcopy Index your code
hub / github.com/apache/echarts / formatTplSimple

Function formatTplSimple

src/util/format.ts:158–166  ·  view source on GitHub ↗
(tpl: string, param: Dictionary<any>, encode?: boolean)

Source from the content-addressed store, hash-verified

156 * simple Template formatter
157 */
158export function formatTplSimple(tpl: string, param: Dictionary<any>, encode?: boolean) {
159 zrUtil.each(param, function (value, key) {
160 tpl = tpl.replace(
161 '{' + key + '}',
162 encode ? encodeHTML(value) : value
163 );
164 });
165 return tpl;
166}
167
168interface RichTextTooltipMarker {
169 renderMode: TooltipRenderMode;

Callers 2

_formatterLabelMethod · 0.90
createMatrixCellFunction · 0.90

Calls 2

encodeHTMLFunction · 0.85
eachMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…