# has-emoji

> Check whether a string has any emoji

Latest version **3.0.0** (published 2023-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install has-emoji
pnpm add has-emoji
yarn add has-emoji
bun add has-emoji
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2023-10-27 |
| First published | 2017-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 106 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | emoji, emojis, string, text, has, contains, includes, detect, is |

## Links

- npm: https://www.npmjs.com/package/has-emoji
- Repository: https://github.com/sindresorhus/has-emoji
- Homepage: https://github.com/sindresorhus/has-emoji#readme
- Issues: https://github.com/sindresorhus/has-emoji/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/has-emoji

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2023-10-27
- 2.0.0 — 2021-09-06
- 1.1.0 — 2019-04-15
- 1.0.0 — 2017-11-08

## README

# has-emoji

> Check whether a string has any emoji

This can be useful when you need to prevent emoji in user input, for example, for usernames.

## Install

```sh
npm install has-emoji
```

## Usage

```js
import hasEmoji from 'has-emoji';

hasEmoji('Unicorn 🦄');
//=> true

hasEmoji('Cat');
//=> false
```

## Related

- [@sindresorhus/is](https://github.com/sindresorhus/is) - Type check values

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