Git Product home page Git Product logo

ascii-emoji-parser's Introduction

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

Build Status Coverage Status npm version

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

Try it out, here is a demo. ¯\(ツ)/¯

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.

ascii-emoji-parser's People

Contributors

alejorod avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.