Cliffy β― Table
Easy solution to render tableβs on the command line
>_ Create cli tableβs with border, padding, nested tableβs, etcβ¦
Usage
Simple table:
import { Table } from 'https://deno.land/x/cliffy/table.ts';
Table.from( [
[ 'Flags', 'Description', 'Types' ],
[ 'cell1', 'cell2', 'cell3' ],
[ 'cell1', 'cell2', 'cell3' ],
[ 'cell1', 'cell2', 'cell3' ]
] )
.maxCellWidth( 50 )
.padding( 1 )
.indent( 2 )
.border( true )
.render();
βββββββββ¬ββββββββββββββ¬ββββββββ
β Flags β Description β Types β
βββββββββΌββββββββββββββΌββββββββ€
β cell1 β cell2 β cell3 β
βββββββββΌββββββββββββββΌββββββββ€
β cell1 β cell2 β cell3 β
βββββββββΌββββββββββββββΌββββββββ€
β cell1 β cell2 β cell3 β
βββββββββ΄ββββββββββββββ΄ββββββββ
Multiline rows:
import { Table } from 'https://deno.land/x/cliffy/table.ts';
Table.from( [
[ 'Flags', 'Description', 'Types' ],
[ 'cell1', 'cell2', 'cell3' ],
[ 'cell1', 'Lorem ipsum dolor sit amet, at nam scripta fierent imperdiet. Et vim eruditi definitiones, quo cu accusamus mediocritatem. Graeci sapientem et eum. Cu dicat vivendum qui, ius percipit conceptam ne. Magna veniam ut his.', 'cell3' ],
[ 'cell1', 'cell2', 'cell3' ]
] )
.maxCellWidth( [ 10, 40, 10 ] )
.padding( 1 )
.indent( 2 )
.border( true )
.render();
βββββββββ¬βββββββββββββββββββββββββββββββββββββ¬ββββββββ
β Flags β Description β Types β
βββββββββΌβββββββββββββββββββββββββββββββββββββΌββββββββ€
β cell1 β cell2 β cell3 β
βββββββββΌβββββββββββββββββββββββββββββββββββββΌββββββββ€
β cell1 β Lorem ipsum dolor sit amet, at nam β cell3 β
β β scripta fierent imperdiet. Et vim β β
β β eruditi definitiones, quo cu β β
β β accusamus mediocritatem. Graeci β β
β β sapientem et eum. Cu dicat β β
β β vivendum qui, ius percipit β β
β β conceptam ne. Magna veniam ut his. β β
βββββββββΌβββββββββββββββββββββββββββββββββββββΌββββββββ€
β cell1 β cell2 β cell3 β
βββββββββ΄βββββββββββββββββββββββββββββββββββββ΄ββββββββ