@cloudflare/util-markdown

Cloudflare Markdown Util

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@cloudflare/util-markdown
Minified + gzip package size for @cloudflare/util-markdown in KB

Readme

cf-util-markdown

Cloudflare Markdown Util

This utility library is a simple interface that hides away the markdown implementation being used so that it can easily be swapped out for something else.

Installation

$ npm install cf-util-markdown

Usage

import markdown from 'cf-util-markdown';

markdown('# Hello World');
// >> <h1>Hello World</h1>

If for some crazy crazy crazy reason you need to stop the markdown from being sanitized you may do the following:

WARNING: Be extremely careful about XSS vulnerabilities when doing this!

markdown('<h1>Hello World</h1>', { __dangerouslyDontSanitizeMarkdown: true });

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.