1.0.0 • Published 8 years ago

translate-emoji v1.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
8 years ago

translate-emoji

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

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.