emoji-regex

emoji-regex offers a regular expression to match all Emoji-only symbols as per the Unicode Standard.
This repository contains a script that generates this regular expression based on the data from Unicode Technical Report #51. Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard.
Installation
Via npm:
npm install emoji-regex
In Node.js:
var emojiRegex = require('emoji-regex');
emojiRegex().test('🆘');
emojiRegex().test('💩');
emojiRegex().test('🇾🇪');
var flag = '🇾🇪';
flag.match(emojiRegex())[0] == flag;
Author
License
emoji-regex is available under the MIT license.