# mentions

> Get user mentions from string or replace user mentions with something else

Latest version **1.0.2** (published 2014-12-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install mentions
pnpm add mentions
yarn add mentions
bun add mentions
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2014-12-03 |
| First published | 2014-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Fredrik Forsmo |
| Maintainers | frozzare |
| Keywords | mention, user, twitter |

## Links

- npm: https://www.npmjs.com/package/mentions
- Repository: https://github.com/frozzare/mentions
- Issues: https://github.com/frozzare/mentions/issues
- npm.io page: https://npm.io/package/mentions

## Recent versions

- 1.0.2 (latest) — 2014-12-03
- 1.0.1 — 2014-12-03
- 1.0.0 — 2014-12-03

## README

# mentions

Get user mentions from string or replace user mentions with something else.

Install the module with npm:

```
$ npm install mentions
```

or with Bower, with AMD and browser support:

```
$ bower install mentions
```

```javascript
$ node
> var mentions = require('mentions');
undefined
> mentions('hello @frozzare').get()
['@frozzare']
> mentions('hello @frozzare ping @user').get()
['@frozzare', '@user']
> mentions('hello @frozzare ping @user').replace(function (mention) {
    return '<a href="http://twitter.com/' + mention.substr(1) + '">' + mention + '</a>';
  });
> 'hello <a href="http://twitter.com/frozzare">@frozzare</a> ping <a href="http://twitter.com/user">@user</a>'
```

## License
Copyright (c) 2014 Fredrik Forsmo  
Licensed under the MIT license.

---
_Source: https://npm.io/package/mentions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
