MCPcopy
hub / github.com/TargetProcess/tauCharts / createElement

Function createElement

examples/index.js:545–560  ·  view source on GitHub ↗
(templateString, props)

Source from the content-addressed store, hash-verified

543 //------------------------------------------
544
545 function createElement(templateString, props) {
546 if (Array.isArray(templateString)) {
547 templateString = templateString.join('\n');
548 }
549 var htmlString;
550 if (props) {
551 htmlString = templateString.replace(/\{\{(.+?)\}\}/g, function (m0, m1) {
552 return String(props[m1]);
553 });
554 } else {
555 htmlString = templateString;
556 }
557 var div = document.createElement('div');
558 div.innerHTML = htmlString;
559 return div.firstElementChild;
560 }
561
562 function getJSPaths(path, left, accumulator) {
563 accumulator = accumulator || [];

Callers 2

index.jsFile · 0.85
createCheckboxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected