Nourishing Pizza Microservice
Miss any of our Open RFC calls?Watch the recordings here! »

emojily

1.0.2 • Public • Published

emojily

Build Status codecov GitHub npm

Encode/Decode engine for text to emoji

Try it online 😛

Usage

  1. 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>
  1. 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');
// '😡😃😍😃😊😃😑😃😑😃😔😋'
  1. 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'

Install

npm i emojily

DownloadsWeekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

21.8 kB

Total Files

14

Last publish

Collaborators

  • avatar