Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table from object with config arguments for all columns #413

Open
jackHedaya opened this issue Nov 14, 2021 · 4 comments
Open

Table from object with config arguments for all columns #413

jackHedaya opened this issue Nov 14, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@jackHedaya
Copy link

Willing to take a crack at this myself, just let me know if this is wanted.

I think it would be useful for the Table constructor or a static from method accepts a object and automatically generates a table. Similar to console.table but also allows a config parameter to change column size and the like.

Let me know!

@jackHedaya
Copy link
Author

Could also be an addition to #printTable

@gregorskii
Copy link

Related, printTable should accept options.

@ayonious ayonious added the enhancement New feature or request label Jul 2, 2023
@ayonious
Copy link
Owner

ayonious commented Jul 2, 2023

Im thinking about how this will look like in code

printTable (rows, optional Options)

This will have same effect as what we have now

const t = new Table(optional Options);
t.addRows(rows);
r.printTable();

To me its already looking quite short the way a Table instance can be created with predefined options.

@ayonious
Copy link
Owner

ayonious commented Jul 7, 2023

This could be useful feature for CLI tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants