• Stars
    star
    1,202
  • Rank 38,965 (Top 0.8 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 10 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

📚 Translate text to ✨emoji ✨!

emoji-translate

You know how sometimes you type English and it has all these letters and words and no emoji? Yeah, emoji-translate fixes that.

Sample demo

omg emoji

This is what you actually want, right? Can't blame you. Here you go. 👏

As a library

You can also use this as a standalone library for your own translation purposes.

Install

npm install moji-translate

Usage

translate = require('moji-translate');

console.log(translate.getAllEmojiForWord('👀'));
console.log(translate.translate("the house is on fire and the cat is eating the cake"));

The emoji-translate api has 5 methods:

  • isMaybeAlreadyAnEmoji -- returns true if a character is already an emoji
  • getAllEmojiForWord(word) -- returns a list of possible emoji translations
  • getEmojiForWord(word) -- returns a random translation from the list returned by getAllEmojiForWord(word)
  • translate(chunk, onlyEmoji) -- returns a translation of the whole chunk of text. If onlyEmoji is true, then the untranslatable words are removed
  • translateForDisplay -- calls translate but returns a <span> element that contains either the original word, or the emoji translation, ready for display (either as a span, or a <select> if multiple translations are available)

Chrome extension

There's also a Chrome extension that lets you translate any page on the internet to emoji. Your nightmares are finally over.

💪

This was made as part of an ⚡️emoji hackday⚡️ and is powered by emojilib, a magical json file of emoji names and keywords y'all should use in all your projects.

More Repositories

1

tiny-care-terminal

💖💻 A little dashboard that tries to take care of you when you're using your terminal.
JavaScript
5,963
star
2

font-style-matcher

⚡️🎨 Matches the x-heights and widths of two fonts
JavaScript
509
star
3

github-canned-responses

💤 (inactive) Because copy pasting isn't that great.
JavaScript
369
star
4

emojillate

📷🎨 Pixellate an image into emoji
HTML
342
star
5

frankly

🔧 A Polymer dashboard of issues/PRs for any number of GitHub repos
HTML
321
star
6

emoji-rain

☔️✨ A Polymer element that makes it rain emoji
HTML
217
star
7

lazy-image

A custom image element that lets you load resources on demand
HTML
213
star
8

cat-dns

💻🐱 A DNS server that resolves everything to cats.
JavaScript
203
star
9

picasso

🎨🗓 [DEPRECATED] A pretty Google Calendar theme
CSS
159
star
10

caturday-post

🐱📲 Push notifications with cats and Polymer
HTML
139
star
11

flash-cards

📓🙊A simple flash cards app to help you learn Japanese (and other languages!)
JavaScript
137
star
12

og-emoji-font

✨📝 Emoji font based on the original DoCoMo emoji set
130
star
13

.not-quite-dotfiles

💰 NO JUDGING
Shell
122
star
14

dear-sir-or-madam

💌 Bookmarklet that ransomifies your internets
JavaScript
103
star
15

literally

🎞🎀 Literally another slide making thingie.
HTML
82
star
16

mojibrag

📢 stuff. Use ✨🙊😂🔥.
HTML
74
star
17

doodle

🎨👾 Doodle with pixels and without pressure
JavaScript
68
star
18

midi-visualizer

A midi visualizer web component
JavaScript
56
star
19

is-mu-an-asleep

Electron app to find out if @muan is asleep
JavaScript
52
star
20

twemojify

💥 Use Twitter's emoji api to fix emoji in Chrome
JavaScript
52
star
21

emoji-selector

✏️✨ A Polymer paper-input-addon element that adds an emoji keyboard inputs
HTML
51
star
22

knit-a-stitch

🎀 Draw a pattern that you want to knit, and get the knitting chart for it!
JavaScript
48
star
23

diagramophone

🎨 code your diagrams, because drawing them really sucks
JavaScript
39
star
24

muster

❇️ A website that lets you play with overlapping patterns.
HTML
31
star
25

notwaldorf.github.com

📢 I lost a bet and now I have a blog.
HTML
31
star
26

to_emoji

🤖✨ Twitter bot that translates every tweet you send it to emoji
JavaScript
30
star
27

ruby-eh

💎 Ruby for Canadians: an instruction manual.
Ruby
25
star
28

sparkle

✨Pixelate and sparkle an image. Any image.
JavaScript
22
star
29

example-magenta-in-ts

A demo of using @magenta/music as a dev-dependency in a TypeScript project
TypeScript
21
star
30

polymer-color-picker

[💤 Deprecated: Go to https://github.com/polymerelements/paper-swatch-picker instead!] A color picker with all the Material Design colours
HTML
18
star
31

is-ie10-dead

💀 Well, is it?
HTML
17
star
32

meowto

🔮 A client-side URL shortener
JavaScript
17
star
33

tensorflow-experiments

JavaScript
13
star
34

gh-wiki-to-pages

[WIP] Automatically publish a GitHub wiki to a gh-pages Jekyll site
CSS
13
star
35

polymer-gold-elements-demo

💸 A checkout form using the Polymer gold elements
HTML
10
star
36

old-research-papers

Old Reinforcement Learning research from university
9
star
37

polymer-demo-transmogrifier

[💤 Deprecated: Go to https://github.com/polymerelements/iron-demo-helpers instead!] Polymer element that renders both the source and demo of a code snippet
HTML
9
star
38

emoji-web-components-art-talk

I gave a talk about web components and art and emoji and this is it.
HTML
7
star
39

bear-or-berra

[WIP, don't look] Who said it, Yogi Bear or Yogi Berra?
JavaScript
7
star
40

shrinkwrap

👔 [forever unfinished] t-shirt sizing / progress tracking app for scrum planning. because sometimes you just have to. and because i have to learn websockets somehow.
JavaScript
7
star
41

fierimas

🎄🎅 It's like Guy Fieri's Grocery Games but for holiday presents
JavaScript
4
star
42

fuck-yeah-css

CSS
4
star
43

shpool-stats

🎱 I play pool every day at lunch and stats need to be had.
JavaScript
2
star
44

ponies

🐴 Here, have a pony
1
star
45

better-form

WIP - look away
HTML
1
star
46

hacknight

Montreal all-girl hack night website!
CSS
1
star
47

input-tests

Look away. Playground to test the v1 custom elements polyfill
HTML
1
star
48

hacknight-chrome-extensions

Sample Chrome Extensions for the all-girl hacknight tutorial
JavaScript
1
star