New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tabular

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tabular

Create fluid lists in which the first column adapts to the content

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-43.75%
Maintainers
2
Weekly downloads
 
Created
Source

node-tabular

Create fluid lists in which the first column adapts to the content

Usage

Using this module is really simple. The example below should show you everything you need to know about the module:

var Tabular = require('tabular');

var tab = new Tabular({
    // allows you to control the padding between the two columns
    padding: 4, // default is 2
    // allows you to control the left margin of the first column
    marginLeft: 2 // default is 0
});

tab.push(['this is useful', 'if you do not know the size']);
tab.push(['of the', 'largest first column']);

console.log(tab.get());

Sorting

You can also sort the list by the first or second column like so:

// ...

console.log(tab.sort('second').get());

Note that once you sort the list, the original order is lost.

Keywords

FAQs

Package last updated on 12 Mar 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