1.0.0 • Published 8 years ago

ascii-emoji-parser v1.0.0

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

Text to Ascii Emoji parser ヽ(´▽`)/

Build Status Coverage Status

It turns text like whaats up? :devious_smile: into whaats up? ಠ‿ಠ

Basic usage:

import AsciiEmojiParser from 'ascii-emoji-parser';

let emojiParser = new AsciiEmojiParser(':');
let text = 'come at me bro :boxing:';

console.log(emojiParser.parse(text)) // come at me bro ლ(•́•́ლ)

Checkout the example file example.js and run it in the terminal with $ babel-node example, remember to install ascii-emoji-parser first!

Installation

With npm:

npm install ascii-emoji-parser

or download it and include it in your page with the script tag

<script src='path/to/lib/ascii-emoji-parser.js'</script>

The ascii emoji module supports UMD, that means it can be used in commonjs, AMD, ES6, and regular script tag import environment. If used with script tags, it attached itself to the global scope with the name AsciiEmojiParser.

Documentation

AsciiEmojiParser
AsciiEmojiParser(str) -> AsciiEmojiParser
AsciiEmojiParser constructor takes in a string representing the separator to distinguish keywords.
AsciiEmojiParser::parse(str) -> str
parse method takes in the text to be parsed and return the parsed text, that is the input text with all keywords enclosed by the parser separator replaced with ascii emojis.
AsciiEmojiParser.getKeywords() -> Arraystr
getKeywords static method returns all the supported keywords by the emoji parser.

Supported Emojis

KeywordEmoji
innocentʘ‿ʘ
disapprovalಠ_ಠ
table_flip(╯°□°)╯︵ ┻━┻
table_back┬─┬ ノ( ゜-゜ノ)
double_flip┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻
super_waving( ゚∀゚)アハハ八八ノヽノヽノヽノ \\ / \/ \
fistacuffsლ(`ー´ლ)
bearʕ•ᴥ•ʔ
big_eyes(。◕‿◕。)
surprised( ゚Д゚ )
shrug¯\(ツ)
meh¯\(°_o)/¯
feel_perky(`・ω・´)
angry(╬ ಠ益ಠ)
excited☜(⌒▽⌒)☞
runningε=ε=ε=┌(;*´Д`)ノ
happyヽ(´▽`)/
basking_in_gloryヽ(´ー`)ノ
kittyᵒᴥᵒ#
fidoV●ᴥ●V
meowฅ^•ﻌ•^ฅ
cheers( ^^)o自自o(^^ )
devious_smileಠ‿ಠ
4chan( ͡° ͜ʖ ͡°)
cryingಥ_ಥ
breakdownಥ﹏ಥ
disagree٩◔̯◔۶
flexingᕙ(⇀‸↼‶)ᕗ
liftᕦ(ò_óˇ)ᕤ
kirby⊂(◉‿◉)つ
tripping_outq(❂‿❂)p
discombobulated⊙﹏⊙
sad_and_confused¯\(⊙︿⊙)
japanese_lion°‿‿°
confused¿ⓧ_ⓧﮌ
confused_scratch(⊙.☉)7
worried(´・_・`)
dear_god_whyщ(゚Д゚щ)
staring٩(͡๏̯͡๏)۶
pretty_eyesఠ_ఠ
strutᕕ( ᐛ )ᕗ
zoned(⊙_◎)
crazyミ●﹏☉ミ
trolling༼∵༽ ༼⍨༽ ༼⍢༽ ༼⍤༽
angry_trollヽ༼ ಠ益ಠ ༽ノ
fuck_itt(-_-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( ˇ෴ˇ )
danceヾ(-_- )ゞ
winnie_the_poohʕ •́؈•̀ ₎
boxingლ(•́•́ლ)
robot{•̃_•̃}
seal(ᵔᴥᵔ)
questionable(Ծ‸ Ծ)

Acknowledgement

Inspired by this cheatsheet made by dysfunc.