forked from dysfunc/ascii-emoji
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemoJSi.js
170 lines (167 loc) · 5.92 KB
/
emoJSi.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/*
BY: rewrite123
Find me here: https://github.com/rewrite123
October 4, 2019
Notes:
Here is a nice quality of life script in js for you so you can reference this in something like NodeJS or vanilla JS.
*/
/* Reference this by the name given */
var referenceByObject = {
"innocent-face": "ʘ‿ʘ",
"reddit-disapproval-face": "ಠ_ಠ",
"table-flip": "(╯°□°)╯︵ ┻━┻",
"put-the-table-back": "┬─┬ ノ( ゜-゜ノ)",
"tidy-up": "┬─┬⃰͡ (ᵔᵕᵔ͜ )",
"double-Flip": "┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻",
"fisticuffs": "ლ(`ー´ლ)",
"cute-bear": "ʕ•ᴥ•ʔ",
"squinting-bear": "ʕᵔᴥᵔʔ",
"GTFO-Bear": "ʕ •`ᴥ•´ʔ",
"cute-face-with-big-eyes": "(。◕‿◕。)",
"surprised": "( ゚Д゚)",
"shrug-face": "¯\\_(ツ)_/¯",
"meh": "¯\\(°_o)/¯",
"feel-perky": "(`・ω・´)",
"angry-face": "(╬ ಠ益ಠ)",
"at-what-cost": "ლ(ಠ益ಠლ)",
"excited": "☜(⌒▽⌒)☞",
"running": "ε=ε=ε=┌(;*´Д`)ノ",
"happy-face": "ヽ(´▽`)/",
"basking-in-glory": "ヽ(´ー`)ノ",
"kitty-emote": "ᵒᴥᵒ#",
"fido": "V•ᴥ•V",
"meow": "ฅ^•ﻌ•^ฅ",
"cheers": "( ^_^)o自自o(^_^ )",
"devious-smile": "ಠ‿ಠ",
"4chan-emoticon": "( ͡° ͜ʖ ͡°)",
"crying-face": "ಥ_ಥ",
"breakdown": "ಥ﹏ಥ",
"disagree": "٩◔̯◔۶",
"flexing": "ᕙ(⇀‸↼‶)ᕗ",
"do-you-even-lift-bro?": " ᕦ(ò_óˇ)ᕤ",
"kirby": "⊂(◉‿◉)つ",
"tripping-out": "q(❂‿❂)p",
"discombobulated": "⊙﹏⊙",
"sad-and-confused": "¯\\_(⊙︿⊙)_/¯",
"japanese-lion-face": "°‿‿°",
"confused": "¿ⓧ_ⓧﮌ",
"confused-scratch": "(⊙.☉)7",
"worried": "(´・_・`)",
"dear-god-why": "щ(゚Д゚щ)",
"staring": "٩(๏_๏)۶",
"pretty-eyes": "ఠ_ఠ",
"strut": "ᕕ( ᐛ )ᕗ",
"zoned": "(⊙_◎)",
"crazy": "ミ●﹏☉ミ",
"trolling": "༼∵༽ ༼⍨༽ ༼⍢༽ ༼⍤༽",
"angry-troll": "ヽ༼ ಠ益ಠ ༽ノ",
"fuck-it": "t(-_-t)",
"sad-face": "(ಥ⌣ಥ)",
"hugger": "(づ ̄ ³ ̄)づ",
"stranger-danger": "(づ。◕‿‿◕。)づ",
"flip-friend": "(ノಠ ∩ಠ)ノ彡( \\o°o)\\",
"cry-face": "。゚( ゚இ‸இ゚)゚。",
"cry-troll": "༼ ༎ຶ ෴ ༎ຶ༽",
"tgif": "“ヽ(´▽`)ノ”",
"dancing": "┌(ㆆ㉨ㆆ)ʃ",
"sleepy": "눈_눈",
"angry-birds": "( ఠൠఠ )ノ",
"no-support": "乁( ◔ ౪◔)「 ┑( ̄Д  ̄)┍",
"shy": "(๑•́ ₃ •̀๑)",
"fly-away": "⁽⁽ଘ( ˊᵕˋ )ଓ⁾⁾",
"careless": "◔_◔",
"love": "-`ღ´-",
"touchy-feely": "ԅ(≖‿≖ԅ)",
"kissing": "( ˘ ³˘)♥",
"shark-face": "( ˇ෴ˇ )",
"emo-dance": "ヾ(-_- )ゞ",
"dance": "♪♪ ヽ(ˇ∀ˇ )ゞ",
"opera": "ヾ(´〇`)ノ♪♪♪",
"winnie-the-pooh": "ʕ •́؈•̀)",
"boxing": "ლ(•́•́ლ)",
"fight": "(ง'̀-'́)ง",
"listening-to-headphones": "◖ᵔᴥᵔ◗ ♪ ♫",
"robot": "{•̃_•̃}",
"seal": "(ᵔᴥᵔ)",
"questionable": "(Ծ‸ Ծ)",
"winning": "(•̀ᴗ•́)و ̑̑",
"zombie": "[¬º-°]¬",
"pointing": "(☞゚ヮ゚)☞",
"whistling": "(っ•́。•́)♪♬",
"injured": "(҂◡_◡)",
"creeper": "ƪ(ړײ)ƪ",
"eye-roll": "⥀.⥀",
"flying": "ح˚௰˚づ",
"things-that-cant-be-unseen": "♨_♨",
"looking-down": "(._.)",
"im-a-hugger": "(⊃。•́‿•̀。)⊃",
"wizard": "(∩`-´)⊃━☆゚.*・。゚",
"yum": "(っ˘ڡ˘ς)",
"judging": "( ఠ ͟ʖ ఠ)",
"tired": "( ͡ಠ ʖ̯ ͡ಠ)",
"dislike": "( ಠ ʖ̯ ಠ)",
"hitchhiking": "(งツ)ว",
"satisfied": "(◠﹏◠)",
"sad-and-crying": "(ᵟຶ︵ ᵟຶ)",
"stunna-shades": "(っ▀¯▀)つ",
"chicken": "ʚ(•`",
"barf": "(´ж`ς)",
"fuck-off": "(° ͜ʖ͡°)╭∩╮",
"smiley-toast": "ʕʘ̅͜ʘ̅ʔ",
"exorcism": "ح(•̀ж•́)ง †",
"taking-a-dump": "(⩾﹏⩽)",
"dab": "ヽ( •_)ᕗ",
"wave-dance": "~(^-^)~",
"happy-hug": "\\(ᵔᵕᵔ)/",
"resting-my-eyes": "ᴖ̮ ̮ᴖ",
"peepers": "ಠಠ",
"judgemental": "{ಠʖಠ}"
}
/*
Passing in no arguments returns the object containing all the faces in their key value pairs.
Passing in one argument allows retrieval of the value.
If the argument is a string it attempts to get it from the referenceByObject as a value of the key
If the argument is a number it attempts to get it from the referenceByIndex as a value of the index
Passing in two arguments allows changing and adding emojis.
If the first argument is a string it attempts to add/change a field of referenceByObject using the second argument as the value
If the fist argument is a number it attempts add/change the value of that index in referenceByIndex to the second argument
*/
function emoji(){
var associatedKeys = Object.keys(referenceByObject);
var referenceByIndex = Object.values(referenceByObject);
if(arguments.length == 0){
return referenceByObject;
}else if(arguments.length == 1){
if( isNaN(arguments[0]) ){
if(referenceByObject[arguments[0]]){
return referenceByObject[arguments[0]];
}else{
return null;
}
}else{
if( parseInt(arguments[0]) >= 0 ){
return referenceByIndex[ parseInt(arguments[0]) ];
}else{
return null;
}
}
}else if(arguments.length == 2){
if( isNaN(arguments[0]) ){
referenceByObject[arguments[0]] = arguments[1];
return referenceByObject;
}else{
if( parseInt(arguments[0]) >= 0 ){
referenceByObject[ associatedKeys[parseInt(arguments[0])] ] = arguments[1];
return referenceByIndex;
}else{
return null;
}
}
}
}
/* For my beloved nodeJS people */
if(typeof module !== 'undefined'){
if(module.exports){
module.exports.emoji = emoji; //Kind of a unorthodox way to provide compatibility to nodeJS but, hey... it ain't stupid if it works
}
}