npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

has-emoji

1.1.0 • Public • Published

has-emoji Build Status

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

License

MIT © Sindre Sorhus

install

npm i has-emoji

Downloadsweekly downloads

393

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability