Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
input = arrify(input);
const keys = [];
const vals = [];
for (const x of input) {
vals.push(objectValues(x));
for (const y of Object.keys(x)) {
if (keys.indexOf(y) === -1) {
keys.push(y);
}
}
}
const width = Math.floor(termSize.columns / (keys.length + 1));
const table = new CliTable(Object.assign({
head: keys,
colWidths: fillArray([width], keys.length)
}, opts));
for (const x of vals) {
table.push(x);
}
return table;
};