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)
!
🙌
Boris 🤔 |
Craigory Coppola 🤔 |
Josh Goldberg ✨ 💻 🖋 📖 🤔 🚇 🚧 📆 🔧 |
Malcolm 🐛 |
fisker Cheung 💻 |
💙 This package was templated with
create-typescript-app
.