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

cli-columns

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-columns

Columnated lists for the CLI.

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
721K
decreased by-6.28%
Maintainers
1
Weekly downloads
 
Created

What is cli-columns?

The cli-columns npm package is a utility for formatting text into columns for command-line interfaces. It helps in organizing and displaying data in a tabular format, making it easier to read and understand.

What are cli-columns's main functionalities?

Basic Column Formatting

This feature allows you to format an array of strings into columns. The code sample demonstrates how to use the cli-columns package to display a list of items in a columnar format.

const columns = require('cli-columns');
const data = ['Name', 'Age', 'Occupation', 'Location'];
console.log(columns(data));

Custom Column Width

This feature allows you to specify a custom width for the columns. The code sample shows how to set the column width to 20 characters.

const columns = require('cli-columns');
const data = ['Name', 'Age', 'Occupation', 'Location'];
console.log(columns(data, { width: 20 }));

Column Padding

This feature allows you to add padding between columns. The code sample demonstrates how to add 2 spaces of padding between each column.

const columns = require('cli-columns');
const data = ['Name', 'Age', 'Occupation', 'Location'];
console.log(columns(data, { padding: 2 }));

Other packages similar to cli-columns

Keywords

FAQs

Package last updated on 14 Feb 2016

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