/contains-emoji

👀 NPM module that checks if a string contains emojis

Primary LanguageJavaScriptMIT LicenseMIT

contains-emoji

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

Install via NPM

$ npm i contains-emoji

Usage

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

const textWithEmoji = 'I love pizza 🍕';

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