contains-emoji
v1.1.8
Published
Checks if a string contains one or more emojis π
Downloads
10,377
Maintainers
Readme
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!');
}