Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@types/easy-table
Advanced tools
Stub TypeScript definitions entry for easy-table, which provides its own types definitions
@types/easy-table provides TypeScript type definitions for the easy-table package, which is a simple and flexible way to create ASCII tables in the terminal or console.
Basic Table Creation
This feature allows you to create a basic table with rows and columns. Each cell is defined with a column name and a value, and new rows are added using the newRow() method.
const Table = require('easy-table');
const t = new Table();
t.cell('Name', 'John Doe');
t.cell('Age', 28);
t.newRow();
t.cell('Name', 'Jane Doe');
t.cell('Age', 26);
console.log(t.toString());
Custom Column Widths
This feature allows you to customize the width of columns and sort the table based on specific columns. The sort method can be used to sort the table by any column in ascending or descending order.
const Table = require('easy-table');
const t = new Table();
t.cell('Name', 'John Doe');
t.cell('Age', 28);
t.newRow();
t.cell('Name', 'Jane Doe');
t.cell('Age', 26);
t.sort(['Age|des']);
console.log(t.print());
Formatting Cells
This feature allows you to format the content of cells. For example, you can format numbers to a specific number of decimal places using the Table.number() method.
const Table = require('easy-table');
const t = new Table();
t.cell('Name', 'John Doe');
t.cell('Age', 28, Table.number(0));
t.newRow();
t.cell('Name', 'Jane Doe');
t.cell('Age', 26, Table.number(0));
console.log(t.toString());
cli-table is another package for creating tables in the terminal. It offers more customization options for table borders and styles compared to easy-table, but it may be slightly more complex to use.
The table package provides a more feature-rich and flexible way to create tables in the terminal. It supports a wide range of customization options, including cell padding, alignment, and border styles. It is more powerful but also more complex than easy-table.
ascii-table is a lightweight package for creating ASCII tables. It is simpler and less feature-rich compared to easy-table, making it suitable for basic table creation needs.
This is a stub types definition for @types/easy-table (https://github.com/eldargab/easy-table#readme).
easy-table provides its own type definitions, so you don't need @types/easy-table installed!
FAQs
Stub TypeScript definitions entry for easy-table, which provides its own types definitions
The npm package @types/easy-table receives a total of 111,181 weekly downloads. As such, @types/easy-table popularity was classified as popular.
We found that @types/easy-table demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.