ascii-emoji-parser

1.0.0 • Public • Published

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() -> Array[str]
getKeywords static method returns all the supported keywords by the emoji parser.

Supported Emojis

Keyword Emoji
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 ᵒᴥᵒ#
fido V●ᴥ●V
meow ฅ^•ﻌ•^ฅ
cheers ( ^^)o自自o(^^ )
devious_smile ಠ‿ಠ
4chan ( ͡° ͜ʖ ͡°)
crying ಥ_ಥ
breakdown ಥ﹏ಥ
disagree ٩◔̯◔۶
flexing ᕙ(⇀‸↼‶)ᕗ
lift ᕦ(ò_óˇ)ᕤ
kirby ⊂(◉‿◉)つ
tripping_out q(❂‿❂)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_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 ( ˇ෴ˇ )
dance ヾ(-_- )ゞ
winnie_the_pooh ʕ •́؈•̀ ₎
boxing ლ(•́•́ლ)
robot {•̃_•̃}
seal (ᵔᴥᵔ)
questionable (Ծ‸ Ծ)

Acknowledgement

Inspired by this cheatsheet made by dysfunc.

Readme

Keywords

Package Sidebar

Install

npm i ascii-emoji-parser

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • alejor