(rows)
| 109228 | } |
| 109229 | // Compute unique columns in order of discovery. |
| 109230 | function 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 | } |
| 109237 | function pad(value, width) { |
| 109238 | var s = value + "", length = s.length; |
| 109239 | return length < width ? new Array(width - length + 1).join(0) + s : s; |
no test coverage detected