Grid for code-blocs and console
Syntaxe
let head = ["","","",...]
let body = [
["","","",...],
["","","",...],
["","","",...],
...
]
console.log( grid( head, body))
Good to know
All arrays in the body must be the same length as the head array. A title setting will be added in future releases. The size of the grid depends on the size of the elements that are displayed.
Example
const grid = require("console-gridlist")
let example = grid("id,name,age",[
["1","patrick","20"],
"2,bob,30",
{id:3,name:"louis",age:21}
])
console.log(example)
Result
id ║ name ║ age
════╬═════════╬════
1 ║ patrick ║ 20
2 ║ bob ║ 30
3 ║ louis ║ 21