Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discord-md-tags

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-md-tags

A collection of tag functions for discord markdown

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

discord-md-tags

A collection of tag functions for discord markdown

These are Tag Functions for use with Tagged Templates

Usage is simple:

const { bold, italic } = require('discord-md-tags');

console.log(bold `text`);
// Logs: "**text**"

console.log(bold `bold ${italic `bold and italic`}`);
// Logs: "**bold *bold and italic***"

This works the same for italic, underline, code, spoiler, strikethrough, quote.

codeblock also works the same, but has a bit more:

const { codeblock } = require('discord-md-tags');

console.log(codeblock `text`);
// Logs: "```\ntext```"

console.log(codeblock('md') `text`);
// Logs: "```md\ntext```"

Find the native javascript nesting a bit ugly? Find beauty by making composite formats with the included compose util!

const { bold, italic, compose } = require('discord-md-tags');

// :(
console.log(bold `${italic `text`}`);
// Logs: "***text***"

// :)
console.log(compose(bold, italic) `text`);
// Logs: "***text***"

Keywords

FAQs

Package last updated on 12 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc