has-emoji
v3.0.0
Published
Check whether a string has any emoji
Maintainers
Readme
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-emojiUsage
import hasEmoji from 'has-emoji';
hasEmoji('Unicorn 🦄');
//=> true
hasEmoji('Cat');
//=> falseRelated
- @sindresorhus/is - Type check values
