Created
October 19, 2019 08:46
-
-
Save callmephil/28cda253c079d1dbffdcaf414fd59f55 to your computer and use it in GitHub Desktop.
EmojiGuyNodeJS, https://www.facebook.com/groups/359999434098189/?fref=nf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const EMOJI = [ | |
{ | |
sentiment: "joy", | |
expression: { | |
extreme: "π", | |
medium: "π", | |
slightly: "π", | |
neutral: "π" | |
} | |
}, | |
{ | |
sentiment: "sad", | |
expression: { | |
extreme: "π", | |
medium: "π", | |
slightly: "π", | |
neutral: "π" | |
} | |
} | |
]; | |
const getEmoji = (sentiment, expression) => { | |
return EMOJI.find(emoji => emoji.sentiment === sentiment).expression[expression]; | |
} | |
console.log(getEmoji("joy", "neutral")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment