has-emoji
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

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

npm install has-emoji

Usage

import hasEmoji from 'has-emoji';

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

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

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i has-emoji

    Weekly Downloads

    181

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    2.67 kB

    Total Files

    5

    Last publish

    Collaborators

    • sindresorhus