Socket
Socket
Sign inDemoInstall

mdtable

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdtable

Generate markdown tables


Version published
Weekly downloads
348
decreased by-49.71%
Maintainers
1
Weekly downloads
 
Created
Source

mdtable

(╯°□°)╯︵ ┻━┻ Generate markdown tables

See it in action, https://mdtables.stobbs.xyz

Install

$ npm install mdtable
$ yarn add mdtable

Usage

const mdtable = require('mdtable')

const table = {
  header: ['A', 'B', 'C'],
  alignment: ['L', 'C', 'R'],
  rows: [
    ['1', '2', '3'],
    ['4', '5', '6'],
    ['7', '8', '9']
  ]
}

const settings = {
  borders: true, // Toggle outer borders of the table
  padding: 1     // Padding on each side of the longest string
}

mdtable(table, settings)
// -> `
| A | B | C |
|:--|:-:|--:|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 8 |
`

Keywords

FAQs

Package last updated on 09 Feb 2018

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