1.0.0 • Published 5 years ago

strip-mentions v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

Strip mentions

Strip @mentions from a string using a default or custom handle style

By default this strips mentions from Discord messages but you can use custom handlers by passing the opening and closing tags as second and third parameters to the function.

Installation

NPM

    npm i --save strip-mentions

Yarn

    yarn add strip-mentions

Usage

Node

const stripMentions = require('strip-mentions');
let msg = '<@!UserId> Hello';
let output = stripMentions(msg);
console.log(output);