Socket
Book a DemoInstallSign in
Socket

markdo

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdo

Tiny markdown formatter

1.0.2
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

markdo

Very tiny (100 LOC) markdown formatter

Instalation

npm install --save markdo

Supported styles

  • # Header 1 (heading1)
  • ## Heading 2 (heading2)
  • ### Heading 3 (heading3)
  • **Bold** (bold)
  • _Italic_ (italic)
  • [link](url) (link)
  • > Quote (quote)
  • - Bullted list (bulletedList)
  • 1. Ordered list (orderedList)
  • [ ] Task list (taskList)

Usage

import markdo from 'markdo';

/**
 * markdo(text: string, style: string, cursorPosition: {start: number, end: number});
 */
const line = 'Think of RxJS as Lodash for events.';
console.log(markdo(line, 'bulletedList', {start: 13, end: 13}));

/*
Think of 

- RxJS

 as Lodash for events.
*/

// you can specify selection of the text as range
console.log(markdo(line, 'bold', {start: 9, end: 13}));

// Think of **RxJS** as Lodash for events.

License

MIT

Keywords

markdown

FAQs

Package last updated on 21 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.