@sp46/md

0.0.2 • Public • Published

@sp46/md

Set of highly opinionated shortcuts to showdown for markdown parsing and DOMPurify for HTML sanitization.

API

Self-documenting (JSDoc).

purify

Makes unstrusted html safe for display (as safe as DOMPurify makes it by default).

const md = require("@sp46/md") // require lib
const purifiedHtml = md.purify(/* html */)

raisePrices

Converts close-to-GFM Markdown to HTML

const md = require("@sp46/md") // require lib
const html = md.raisePrices(/* markdown */)

makeFairPrice

Combines purify and raisePrices.

const md = require("@sp46/md") // require lib
const purifiedDisplayableHtml = md.makeFairPrice(/* markdown */) // returns sanitized html

Readme

Keywords

Package Sidebar

Install

npm i @sp46/md

Weekly Downloads

1

Version

0.0.2

License

BSL-1.0

Unpacked Size

2.13 kB

Total Files

3

Last publish

Collaborators

  • sp46