adamschwartz / log

Console.log with style.
https://adamschwartz.co/log
MIT License
3.01k stars 139 forks source link

PR: Table Log #39

Closed amilajack closed 7 years ago

amilajack commented 8 years ago

Willing to make a PR for a feature similar to console.table(). Would this pr be welcome?

adamschwartz commented 8 years ago

as i understand it, console.table does stuff like this:

image

what would ur pr do?

amilajack commented 8 years ago

I'd make an api that's much more easy to use. So if a user simply logged an object, the output would be something like:

{
 name: 'john',
 age: 43,
 eyeColor: black
}

    Name: john

    Age: 43

...so forth.

This is especially useful for arrays of objects.

adamschwartz commented 7 years ago

One of the goals of this project is keeping it small. The current version as of the time of this writing is 2.13 KB (log.min.js @ v0.3.0).

It’s hard to say which PRs I would or wouldn’t accept without seeing them, but I will say that if you can keep the change small yet accomplish a significant improvement over the existing features of log and console.table for a clear use-case, then I’d certainly consider it. I leave it up to you!

And of course you’re always welcome to fork log into something called console.betterTable and ship it as an accompanying lib. And if it plays nicely with log I’d be happy to list it in the README as an accompanying lib. Good luck!

amilajack commented 7 years ago

I see. Thanks for clarifying!