https://github.com/truemedia/strip-mentions
Strip @mentions from a string using a default or custom handle style
https://github.com/truemedia/strip-mentions
Last synced: 4 months ago
JSON representation
Strip @mentions from a string using a default or custom handle style
- Host: GitHub
- URL: https://github.com/truemedia/strip-mentions
- Owner: Truemedia
- License: mit
- Created: 2018-11-24T21:05:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-24T21:14:24.000Z (over 6 years ago)
- Last Synced: 2025-02-13T08:51:21.310Z (4 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Strip mentions
Strip @mentions from a string using a default or custom handle styleBy 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
```bash
npm i --save strip-mentions
```Yarn
```bash
yarn add strip-mentions
```## Usage
Node
```js
const stripMentions = require('strip-mentions');
let msg = '<@!UserId> Hello';
let output = stripMentions(msg);
console.log(output);
```