# is-emojis

> Library to identify strings containing one or multiple emojis only

Latest version **1.0.8** (published 2020-11-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-emojis
pnpm add is-emojis
yarn add is-emojis
bun add is-emojis
```

## 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.8 |
| Published | 2020-11-03 |
| First published | 2020-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 52.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sebastian Wilczek |
| Maintainers | sebastianwilczek |
| Keywords | emoji, emojis |

## Links

- npm: https://www.npmjs.com/package/is-emojis
- Repository: https://github.com/sebastianwilczek/is-emojis
- Homepage: https://github.com/sebastianwilczek/is-emojis#readme
- Issues: https://github.com/sebastianwilczek/is-emojis/issues
- npm.io page: https://npm.io/package/is-emojis

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.20

## Recent versions

- 1.0.8 (latest) — 2020-11-03
- 1.0.7 — 2020-11-03
- 1.0.6 — 2020-11-03
- 1.0.5 — 2020-11-03
- 1.0.4 — 2020-11-03
- 1.0.3 — 2020-11-03
- 1.0.2 — 2020-11-03
- 1.0.1 — 2020-11-03
- 1.0.0 — 2020-11-03

## README

# is-emojis

A Node.js library to identify strings containing one or multiple emojis only.

## Installation

To use `is-emojis` in your Node.js project, run the following command.

```
npm install is-emojis
```

## Usage

To use `is-emojis` in a file, import it as such:

```
const { isOneEmoji, isMultipleEmoji } = require('is-emojis');
```

If your JavaScript file is part of a module, you can also import it this way:

```
import { isOneEmoji, isMultipleEmoji } from 'is-emojis';
```

`isOneEmoji` and `isMultipleEmoji` are now available as functions. For API details, see the section below.

## API

This library provides two functions to check if a given string is one or multiple emojis.

| Function Name     | Parameters | Return value | Description                                                                                                              |
| ----------------- | ---------- | ------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `isOneEmoji`      | `string`   | `boolean`    | Returns `true` if the provided string is an emoji and no other text, ignoring leading and trailing whitespace.           |
| `isMultipleEmoji` | `string`   | `boolean`    | Returns `true` if the provided string is at least one emoji and no other text, ignoring leading and trailing whitespace. |

## Example

```
isOneEmoji('Hello'); // returns false
isOneEmoji('Hello World'); // returns false
isOneEmoji(''); // returns false
isOneEmoji(1); // returns false
isOneEmoji(null); // returns false
isOneEmoji('😂'); // returns true
isOneEmoji('Hi 😂'); // returns false
isOneEmoji('👩‍👩‍👧‍👧'); // returns true
isOneEmoji('👩‍👩‍👧‍👧👩‍👩‍👧‍👧'); // returns false
isOneEmoji('👩‍👩‍👧‍👧 '); // returns true
isOneEmoji('     👩‍👩‍👧‍👧'); // returns true

isMultipleEmoji('Hello'); // returns false
isMultipleEmoji('Hello World'); // returns false
isMultipleEmoji(''); // returns false
isMultipleEmoji(1); // returns false
isMultipleEmoji(null); // returns false
isMultipleEmoji('😂'); // returns true
isMultipleEmoji('Hi 😂'); // returns false
isMultipleEmoji('👩‍👩‍👧‍👧'); // returns true
isMultipleEmoji('👩‍👩‍👧‍👧👩‍👩‍👧‍👧'); // returns true
isMultipleEmoji('👩‍👩‍👧‍👧 '); // returns true
isMultipleEmoji('     👩‍👩‍👧‍👧'); // returns true
isMultipleEmoji(' 👩‍👩‍👧‍👧    👩‍👩‍👧‍👧'); // returns false
```

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