π Escape formatting characters in order to send messages to discord based on regex.
π© Installation:
npm install discord-escape
π Sample code snippet:
const escape = require("discord-escape");
console.log(escape("@everyone **This is a test** __yeah!__ `ok?`"));
// @βeveryone \*\*This is a test\*\* \_\_yeah\!\_\_ \`ok?\`
// ^ Invisible character between @ and everyone
Really needed?
Make a feature request on github if you think something is missing!