MCPcopy Create free account
hub / github.com/DenOfEquity/ersatzForge / createRow

Function createRow

javascript/profilerVisualization.js:2–34  ·  view source on GitHub ↗
(table, cellName, items)

Source from the content-addressed store, hash-verified

1
2function createRow(table, cellName, items) {
3 var tr = document.createElement('tr');
4 var res = [];
5
6 items.forEach(function(x, i) {
7 if (x === undefined) {
8 res.push(null);
9 return;
10 }
11
12 var td = document.createElement(cellName);
13 td.textContent = x;
14 tr.appendChild(td);
15 res.push(td);
16
17 var colspan = 1;
18 for (var n = i + 1; n < items.length; n++) {
19 if (items[n] !== undefined) {
20 break;
21 }
22
23 colspan += 1;
24 }
25
26 if (colspan > 1) {
27 td.colSpan = colspan;
28 }
29 });
30
31 table.appendChild(tr);
32
33 return res;
34}
35
36function createVisualizationTable(data, cutoff = 0, sort = "") {
37 var table = document.createElement('table');

Callers 2

createVisualizationTableFunction · 0.85
addLevelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected