/translate-emoji

Translate emoji to text

Primary LanguageJavaScriptMIT LicenseMIT

translate-emoji

You know how sometimes you read English and it has all these non-word characters (emoji)? Yeah, translate-emoji fixes that.

NPM

Install

npm install translate-emoji

Usage

var translateEmoji = require('translate-emoji'),
    testString;

testString = '📰 I had a nice day at work! 👩';

console.log(translateEmoji.translate(testString));
// (newspaper) I had a nice day at work! (woman)

console.log(translateEmoji.translate(testString, true));
// I had a nice day at work!

console.log(translateEmoji.containsEmoji(testString));
// true

Thanks

A good portion of this is powered by emojilib, a magical json file of emoji names and keywords y'all should use in all your projects.