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

markdown-it-table-sort

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-table-sort

A plugin for Markdown It to sort table by content

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

markdown-it-table-sort

A plugin for Markdown It to sort table by content.

version license

English | 中文

Install

pnpm i markdown-it-table-sort -D

Usage

import md from 'markdown-it'
import tableSort from 'markdown-it-table-sort'

md().use(tableSort)

// With options
md().use(tableSort, { reverse: true })

Options

export interface PluginOptions {
  /**
   * Whether to reverse the sorted result
   *
   * @default false
   */
  reverse?: boolean,
  /**
   * Specify a method to sort rows by content
   */
  sortRows?: (prev: string[], next: string[]) => number
}

Contributors

Thanks for all the contributions!

License

MIT License.

Keywords

FAQs

Package last updated on 25 Aug 2023

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