Emoji to short-name 🎉😊
Encode/Decode emojis 📝 inside a string to/from his :short-name:
Why?
Sometimes it's safer to store and transfer emojis
under an ASCII safe format to prevent the information to get messy or have her integrity violated. So, this package intention is to provide an easy way to:
Encode message -> delivery/store -> Decode message to present
.
How it works 🚀
Input string:
We are meshing 📝 language with 👀 language to communicate ideas and feelings.
Encoding
emojiSn.encode(input);
Outputs encoded string: We are meshing :memo: language with :eyes: language to communicate ideas and feelings.
Decoding
emojiSn.decode(encoded);
Outputs decoded string: We are meshing 📝 language with 👀 language to communicate ideas and feelings.
Installing
📲 Downloading
-
Using
npm
oryarn
# Using npmnpm install emoji-to-short-name --save# Using yarnyarn add emoji-to-short-name
👀 Example/Using
const emojiSn = ; const input = "We are meshing 📝 language with 👀 language to communicate ideas and feelings.";const encoded = emojiSn;console;// => We are meshing :memo: language with :eyes: language to communicate ideas and feelings. const decoded = emojiSn;console;// => We are meshing 📝 language with 👀 language to communicate ideas and feelings.
📋 Docs
Method | Attributes | Output |
---|---|---|
encode(input) |
input the input string to be encoded |
Same input string but with emojis being replaced by their equivalent :short-name: |
decode(input) |
input the input string to be decoded |
Same input string but with valid :short-name:'s being replaced by their equivalent emojis |
Public HTTP REST API
There're a simple API that provides this lib as an http REST service.
More info at: https://emoji-to-short-name.herokuapp.com/
Enconding with API:
https://emoji-to-short-name.herokuapp.com/encode?input=Hello world 🌎
Decoding with API:
https://emoji-to-short-name.herokuapp.com/decode?input=Hello world :earth_americas:
License
Go on, just do it.