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

1.2.4 • Public • Published

contains-emoji

  • 🚀 Simple NPM package that checks if a string contains one or more emojis 👀
  • 📦 It uses Emoji Regex NPM module

📦 Install via NPM

$ npm i contains-emoji

💻 Usage

  • Returns a Boolean indicating whether string contains one or more emojis.
  • See examples below
const containsEmoji = require('contains-emoji');

const textWithEmoji = 'I love pizza 🍕';

if (containsEmoji(textWithEmoji)) {
    console.log('Text contains one or more emojis!');
}

Package Sidebar

Install

npm i contains-emoji

Weekly Downloads

1,744

Version

1.2.4

License

MIT

Unpacked Size

7.88 kB

Total Files

7

Last publish

Collaborators

  • tutyamxx