MCPcopy
hub / github.com/microsoft/SandDance / inferColumns

Function inferColumns

docs/app/js/sanddance-app.js:109230–109236  ·  view source on GitHub ↗
(rows)

Source from the content-addressed store, hash-verified

109228}
109229// Compute unique columns in order of discovery.
109230function inferColumns(rows) {
109231 var columnSet = Object.create(null), columns = [];
109232 rows.forEach(function(row) {
109233 for(var column in row)if (!(column in columnSet)) columns.push(columnSet[column] = column);
109234 });
109235 return columns;
109236}
109237function pad(value, width) {
109238 var s = value + "", length = s.length;
109239 return length < width ? new Array(width - length + 1).join(0) + s : s;

Callers 2

formatFunction · 0.70
formatBodyFunction · 0.70

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected