MCPcopy Create free account
hub / github.com/apache/storm / processArray

Function processArray

storm-webapp/src/main/webapp/lib/jsonFormatter.js:92–109  ·  view source on GitHub ↗
(arr, level, comma, isChild, settings)

Source from the content-addressed store, hash-verified

90 }
91
92 function processArray(arr, level, comma, isChild, settings) {
93 if (arr.length === 0) {
94 return indent(level, "<span class='jsonFormatter-arrayBrace'>[ ]</span>" + comma, settings);
95 }
96
97 var expander = settings.collapsible
98 ? "<span class='jsonFormatter-expander jsonFormatter-expanded'></span><span class='jsonFormatter-collapsible'>"
99 : '';
100 var closer = settings.collapsible ? '</span>' : '';
101 var html = indent(level, "<span class='jsonFormatter-arrayBrace'>[</span>" + expander, settings);
102
103 for (var i = 0; i < arr.length; i++) {
104 html += processValue(arr[i], level + 1, i < arr.length - 1, true, settings);
105 }
106
107 html += indent(level, closer + "<span class='jsonFormatter-arrayBrace'>]</span>" + comma, settings);
108 return html;
109 }
110
111 function processObject(obj, level, comma, isChild, settings) {
112 var keys = Object.keys(obj);

Callers 1

processValueFunction · 0.85

Calls 2

indentFunction · 0.85
processValueFunction · 0.85

Tested by

no test coverage detected