MCPcopy Create free account
hub / github.com/TruthHun/BookStack / formatArray

Function formatArray

static/word2md/mammoth.browser.js:29835–29852  ·  view source on GitHub ↗
(ctx, value, recurseTimes, visibleKeys, keys)

Source from the content-addressed store, hash-verified

29833
29834
29835function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
29836 var output = [];
29837 for (var i = 0, l = value.length; i < l; ++i) {
29838 if (hasOwnProperty(value, String(i))) {
29839 output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
29840 String(i), true));
29841 } else {
29842 output.push('');
29843 }
29844 }
29845 keys.forEach(function(key) {
29846 if (!key.match(/^\d+$/)) {
29847 output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
29848 key, true));
29849 }
29850 });
29851 return output;
29852}
29853
29854
29855function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {

Callers 1

formatValueFunction · 0.70

Calls 2

hasOwnPropertyFunction · 0.70
formatPropertyFunction · 0.70

Tested by

no test coverage detected