emojily
v1.0.2
Published
transfer both text to emoji and emoji to text
Downloads
7
Readme
emojily
Encode/Decode engine for text to emoji
Usage
- Install
npm install emojily --save
or use from CDN for browser
<srcipt type="text/javascript" src="https://cdn.rawgit.com/zmofei/emojily/master/dist/emojily.js"></script>
- encode text to emoji
const {encode} = require('emojily');
encode('hello');
// the output will be: 😎😃😜😃😙😃😠😃😠😄😁😚
// every time it wil return defferent output even you encode same word.
// eg:
// > encode('hello');
// '😋😃😙😃😖😃😝😃😝😃😠😗'
// > encode('hello');
// '😄😃😒😃😏😃😖😃😖😃😙😐'
// > encode('hello');
// '😡😃😍😃😊😃😑😃😑😃😔😋'
- decode from emoji
const {decode} = require('emojily');
decode('😋😃😙😃😖😃😝😃😝😃😠😗');
// the output will be: 'hello'
// tips: the emoji text must from encode, and you can not change any letter in the text.
// eg:
// if you are try to switch the last 2 letter 😋😃😙😃😖😃😝😃😝😃😠😗 => 😋😃😙😃😖😃😝😃😝😃😗😠
// then you tru decode('😋😃😙😃😖😃😝😃😝😃😗😠');
// it will throw an error like: 'Error Input, Please do not try to change any character'