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

marked-terminal

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marked-terminal

A custom render for marked to output to the Terminal

  • 7.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is marked-terminal?

The marked-terminal package is a custom renderer for the marked library, allowing Markdown content to be rendered in the terminal. It converts Markdown into ANSI escape codes to display styled text and other elements directly in the command line interface. This is particularly useful for CLI applications that want to display rich text content or documentation in a more readable and visually appealing format.

What are marked-terminal's main functionalities?

Rendering Headers

This feature allows the rendering of Markdown headers in the terminal with appropriate styling to distinguish them from other text.

const TerminalRenderer = require('marked-terminal');
const marked = require('marked');

marked.setOptions({
  renderer: new TerminalRenderer()
});

console.log(marked('# Header 1'));
// This will output a styled Header 1 in the terminal

Rendering Links

This feature enables the display of clickable links in the terminal, making it easier to reference web resources directly from the command line output.

const TerminalRenderer = require('marked-terminal');
const marked = require('marked');

marked.setOptions({
  renderer: new TerminalRenderer()
});

console.log(marked('[GitHub](https://github.com)'));
// This will output the text 'GitHub' as a clickable link in the terminal, if supported, or display the URL next to the text.

Rendering Lists

This feature supports the rendering of bullet and numbered lists, enhancing the readability of list information in the terminal.

const TerminalRenderer = require('marked-terminal');
const marked = require('marked');

marked.setOptions({
  renderer: new TerminalRenderer()
});

console.log(marked('- Item 1\n- Item 2'));
// This will output a styled list with 'Item 1' and 'Item 2' as its elements.

Other packages similar to marked-terminal

Keywords

FAQs

Package last updated on 30 Oct 2024

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