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
const hasEmoji = require('has-emoji');
hasEmoji('Unicorn 🦄');
//=> true
hasEmoji('Cat');
//=> false
Related
- @sindresorhus/is - Type check values
License
MIT © Sindre Sorhus