Socket
Socket
Sign inDemoInstall

markdown-table

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-table

Generate a markdown (GFM) table


Version published
Weekly downloads
3.8M
decreased by-22.03%
Maintainers
1
Weekly downloads
 
Created

What is markdown-table?

The markdown-table npm package is a utility for generating tables in Markdown format. It allows users to create well-formatted Markdown tables from arrays of data, providing options to customize alignment and padding.

What are markdown-table's main functionalities?

Basic Table Creation

This feature allows the creation of a basic Markdown table from an array of arrays. Each sub-array represents a row in the table.

const markdownTable = require('markdown-table');

const table = markdownTable([
  ['Branch', 'Commit'],
  ['master', '0123456789abcdef'],
  ['staging', 'fedcba9876543210']
]);

console.log(table);

Custom Alignment

This feature enables the specification of alignment for each column in the table. 'l' stands for left, 'c' for center, and 'r' for right.

const markdownTable = require('markdown-table');

const table = markdownTable(
  [
    ['Feature', 'Support'],
    ['Tables', 'Yes'],
    ['Alignment', 'Yes']
  ],
  { align: ['l', 'c'] }
);

console.log(table);

Other packages similar to markdown-table

Keywords

FAQs

Package last updated on 30 Nov 2022

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