Quick parsing of HTML to slack's mrkdwn for use with their API
To install with NPM run
npm install html2mrkdwn
The parser is contained within the static convert()
method. Two examples are showen below with both usage in es5 and CommonJS.
es5
import {html2mrkdwn} from 'html2mrkdwn';
console.log(html2mrkdwn.convert('<p>Hello World<p>'));
CommonJS
const convert = require('html2mrkdwn');
console.log(convert.html2mrkdwn.convert('<p>Hello World</p>'));