strip-mentions

1.0.0 • Public • Published

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

Dependents (1)

Package Sidebar

Install

npm i strip-mentions

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

3.06 kB

Total Files

5

Last publish

Collaborators

  • truemedia