The built-in Node.js console.table
, but without the annoying (index)
column. π
Without this utility:
console.table([
{ emoji: "π", fruit: "apple" },
{ emoji: "π", fruit: "banana" },
{ emoji: "π", fruit: "cherry" },
]);
βββββββββββ¬ββββββββ¬βββββββββββ
β (index) β emoji β fruit β
βββββββββββΌββββββββΌβββββββββββ€
β 0 β 'π' β 'apple' β
β 1 β 'π' β 'banana' β
β 2 β 'π' β 'cherry' β
βββββββββββ΄ββββββββ΄βββββββββββ
Look at that (index)
column!
Wouldn't it be nice to get rid of it if you don't need it?
With this utility:
npm i console-table-without-index
import { table } from "console-table-without-index";
console.log(
table([
{ emoji: "π", fruit: "apple" },
{ emoji: "π", fruit: "banana" },
{ emoji: "π", fruit: "cherry" },
]),
);
βββββββββ¬βββββββββββ
β emoji β fruit β
βββββββββΌβββββββββββ€
β 'π' β 'apple' β
β 'π' β 'banana' β
β 'π' β 'cherry' β
βββββββββ΄βββββββββββ
Hooray!
No more (index)
!
π
Craigory Coppola π€ |
Josh Goldberg β¨ π» π π π€ π π§ π π§ |
Malcolm π |
fisker Cheung π» |
π This package was templated with
create-typescript-app
.