Nosferatu's Pace Maker

npm

Need private packages and team management tools?Check out npm Orgs. »

hexoji

1.0.0 • Public • Published

hexoji

hexoji is a module for deterministically encoding and decoding hexadecimal strings as emoji using characters from the Emoticons Unicode block. Encodings can be performed using one of five character sets.

Build status

available character sets

default: Set 0

Set 0 Set 1 Set 2 Set 3 Set 4
0 😀 😐 😠 😰 🙀
1 😁 😑 😡 😱 🙁
2 😂 😒 😢 😲 🙂
3 😃 😓 😣 😳 🙃
4 😄 😔 😤 😴 🙄
5 😅 😕 😥 😵 🙅
6 😆 😖 😦 😶 🙆
7 😇 😗 😧 😷 🙇
8 😈 😘 😨 😸 🙈
9 😉 😙 😩 😹 🙉
a 😊 😚 😪 😺 🙊
b 😋 😛 😫 😻 🙋
c 😌 😜 😬 😼 🙌
d 😍 😝 😭 😽 🙍
e 😎 😞 😮 😾 🙎
f 😏 😟 😯 😿 🙏

example

var sha1 = require('simple-sha1')
var encode = require('hexoji/encode')
var decode = require('hexoji/decode')
var set = undefined // or a number [0-4]
 
sha1('hexoji', function (hash) {
  console.log(hash)
  > '19d52be9ca083fa5903c8ac807e693c2ed037abe'
  console.log(encode(hash, set))
  > '😁😉😍😅😂😋😎😉😌😊😀😈😃😏😊😅😉😀😃😌😈😊😌😈😀😇😎😆😉😃😌😂😎😍😀😃😇😊😋😎'
  console.log(decode(encode(hash, set)))
  > '19d52be9ca083fa5903c8ac807e693c2ed037abe'
})

install

$ npm install hexoji

licence

MIT

install

npm i hexoji

Downloadsweekly downloads

1

version

1.0.0

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability