MCPcopy Create free account
hub / github.com/RubyLouvre/anu / formatArray

Function formatArray

test/babel.js:10933–10948  ·  view source on GitHub ↗
(ctx, value, recurseTimes, visibleKeys, keys)

Source from the content-addressed store, hash-verified

10931 }
10932
10933 function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
10934 var output = [];
10935 for (var i = 0, l = value.length; i < l; ++i) {
10936 if (hasOwnProperty(value, String(i))) {
10937 output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
10938 } else {
10939 output.push('');
10940 }
10941 }
10942 keys.forEach(function (key) {
10943 if (!key.match(/^\d+$/)) {
10944 output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
10945 }
10946 });
10947 return output;
10948 }
10949
10950 function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
10951 var name, str, desc;

Callers 1

formatValueFunction · 0.85

Calls 2

hasOwnPropertyFunction · 0.85
formatPropertyFunction · 0.85

Tested by

no test coverage detected