Is it possible without installing new package?
Here i am using cli-table package..
Any easy way to do it ?
I love this package for updating texts on the terminal instead of adding new lines : https://github.com/ivanseidel/node-draftlog
var values = [];
Array.forEach(function(b, i) {
values.push(
{
'Symbol': b.a,
'BID': b.b,
'CONVERT1': b.c,
'Buy': b.d,
'Sell': b.e,
'Convert2': b.f
});
});
console.table(values);
Result Console
node.js version v10.16.0
, you can use console.table API without installing any node module.
const structDatas = [
{ handler: 'http', endpoint: 'http://localhost:3000/path', method: 'ALL' },
{ handler: 'event', endpoint: 'http://localhost:3000/event', method: 'POST' },
{ handler: 'GCS', endpoint: 'http://localhost:3000/GCS', method: 'POST' }
];
console.table(structDatas);
The stdout in terminal like this: