MCPcopy Create free account
hub / github.com/binux/qiandao / formatArray

Function formatArray

web/static/node_components.js:3190–3207  ·  view source on GitHub ↗
(ctx, value, recurseTimes, visibleKeys, keys)

Source from the content-addressed store, hash-verified

3188
3189
3190function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
3191 var output = [];
3192 for (var i = 0, l = value.length; i < l; ++i) {
3193 if (hasOwnProperty(value, String(i))) {
3194 output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
3195 String(i), true));
3196 } else {
3197 output.push('');
3198 }
3199 }
3200 keys.forEach(function(key) {
3201 if (!key.match(/^\d+$/)) {
3202 output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
3203 key, true));
3204 }
3205 });
3206 return output;
3207}
3208
3209
3210function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {

Callers 1

formatValueFunction · 0.85

Calls 2

hasOwnPropertyFunction · 0.85
formatPropertyFunction · 0.85

Tested by

no test coverage detected