Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

text-table

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

text-table

borderless text tables with alignment

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34M
decreased by-7.7%
Maintainers
1
Weekly downloads
 
Created

What is text-table?

The text-table npm package is a utility for formatting data into a table-like structure using plain text. It is useful for creating simple, readable tables in console applications or for formatting data in a tabular form without the need for HTML or graphical interfaces.

What are text-table's main functionalities?

Simple table creation

This feature allows you to create a simple text-based table with rows of data. Each sub-array represents a row in the table.

var table = require('text-table');
var t = table([
    ['master', '0123456789abcdef', 'Initial commit'],
    ['test', 'fedcba9876543210', 'Work in progress']
]);
console.log(t);

Alignment and padding

This feature allows you to specify alignment and padding for the columns in the table. The 'align' option takes an array of characters representing the alignment for each column ('.' for right, '-' for left). The 'hsep' option specifies a horizontal separator.

var table = require('text-table');
var t = table([
    ['beep', '1024'],
    ['boop', '33450'],
    ['foo', '1006'],
    ['bar', '45']
], { align: ['.','-'], hsep: ' | ' });
console.log(t);

Other packages similar to text-table

Keywords

FAQs

Package last updated on 05 Oct 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc