Skip to content

The built-in Node.js console.table, but without the annoying (index) column. πŸ“Š

License

Notifications You must be signed in to change notification settings

JoshuaKGoldberg/console-table-without-index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

console.table Without (index)

The built-in Node.js console.table, but without the annoying (index) column. πŸ“Š

πŸ‘ͺ All Contributors: 4 🀝 Code of Conduct: Kept πŸ§ͺ Coverage πŸ“ License: MIT πŸ“¦ npm version πŸ’ͺ TypeScript: Strict

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?

Usage

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)! πŸ™Œ

Contributors

Craigory Coppola
Craigory Coppola

πŸ€”
Josh Goldberg ✨
Josh Goldberg ✨

πŸ’» πŸ–‹ πŸ“– πŸ€” πŸš‡ 🚧 πŸ“† πŸ”§
Malcolm
Malcolm

πŸ›
fisker Cheung
fisker Cheung

πŸ’»

πŸ’™ This package was templated with create-typescript-app.

About

The built-in Node.js console.table, but without the annoying (index) column. πŸ“Š

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •