0.2.1 • Published 5 years ago

webex-markdown v0.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

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]);
0.2.1

5 years ago

0.1.0

5 years ago