JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q30053F
  • License MIT

write messages once, transpile many times

Package Exports

  • transpile-md
  • transpile-md/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (transpile-md) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

transpile-md

write markdown once, transpile many times

transpile-md converts Github-flavored markdown to a target output such as HTML, Slack, Discord, or Telegram.

Install

npm install transpile-md
yarn add transpile-md

Usage

const transpileMd = require('transpile-md');
const markdown = `
**List of items**

* item 1
* item 2
* item 3

[here is an example](https://example.com)
`;

transpileMd(markdown, { target: 'slack' });
/*
 *List of items*

 • item 1
 • item 2
 • item 3

 <https://example.com|here is an example>
/*

API

options

options.target

Required - valid values include:

options.highlight

HTML can be highlighted by assigning valid rehype-highlight options to the options.highlight parameter.

This is only valid with target: html. It will be ignored for other targets.

Credit to slackify-markdown for providing the basis for this package.