🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis β†’
Socket
Book a DemoInstallSign in
Socket

emojily

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emojily

transfer both text to emoji and emoji to text

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

emojily

Build Status codecov GitHub npm

Encode/Decode engine for text to emoji

Try it online πŸ˜›

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'

Keywords

emoji

FAQs

Package last updated on 25 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts