Need private packages and team management tools?Check out npm Teams »

webex-markdown

0.2.1 • Public • Published

Markdown helper for Webex Teams

If you are writing messages as a human, markdown is great. But if you create messages programatically as a bot, it can be frustrating and error prone to write newlines and string concatenations all over the place.

Goal:

  • Never write \n again.
  • Don't need to remember markdown syntax
  • Avoid string concatenation
  • Make working with lists easier
  • Programmatic approach instead of string manipulations

Example use case:

const { convert, bold, list, url, mention } = require('webex-markdown');
const hi = `Hi, welcome to ${bold('Markdown')}`;
const hi2 = 'I can do the following:';
const features = list(['Lists', 'Bold', 'Links', 'Code', 'Mention', 'And more']);
const link = `See ${url('npmjs.org', 'our npm page')} for more info`;
const author = mention(`Made by ${mention('tore@acme.com', 'Tore')}`);
const markdown = convert([hi, hi2, features, link, author]);

Install

npm i webex-markdown

DownloadsWeekly Downloads

0

Version

0.2.1

License

ISC

Unpacked Size

3.95 kB

Total Files

4

Last publish

Collaborators

  • avatar