0.1.0-beta3 • Published 23 days ago

html-mrkdwn-lite v0.1.0-beta3

Weekly downloads
-
License
ISC
Repository
github
Last release
23 days ago

html-mrkdwn-lite

A lightweight HTML to Slack mrkdwn converter.

Uses the zero-dependency dom-parser package.

Installation

npm install html-mrkdwn-lite

Usage

import { convert } from 'html-mrkdwn-lite';

const html = `<p><strong>Hello</strong> <a href="https://example.com">world</a>!</p>
<p><img src="https://media.giphy.com/media/5xtDarEbygs3Pu7p3jO/giphy.gif"></p>`

const output = convert(html);
// {
//   text: "*Hello* <https://example.com|world>!",
//   image: "https://media.giphy.com/media/5xtDarEbygs3Pu7p3jO/giphy.gif",
// }

Contributing

Issues and pull requests are welcome!

0.1.0-beta3

23 days ago

0.1.0-beta2

27 days ago

0.1.0-beta

28 days ago