(templateString, props)
| 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 || []; |
no outgoing calls
no test coverage detected