Get the unicode code of an emoji.
$ npm i emoji-unicode
"use strict";
const emojiUnicode = require("emoji-unicode")
, toEmoji = require("emoji-name-map")
;
console.log(emojiUnicode("๐ป"));
// => 1f4fb
console.log(emojiUnicode.raw("๐ป"));
// => 128251
console.log(emojiUnicode("๐ฉ๐ฝโ๐ป"));
// => 1F469 1F3FD 200D 1F4BB
console.log(emojiUnicode.raw("๐ฉ๐ฝโ๐ป"));
// => 128105 127997 8205 128187
console.log(emojiUnicode.raw("๐ณ๏ธโ๐"));
// => 127987 65039 8205 127752
console.log(emojiUnicode("๐ณ๏ธโ๐"));
// => 1F3F3 FE0F 200D 1F308
console.log(emojiUnicode(toEmoji.get(":radio:")));
// => 1f4fb
console.log(emojiUnicode(toEmoji.get("radio")));
// => 1f4fb
Get the unicode code of an emoji in base 16.
- String
input
: The emoji character.
- String The base 16 unicode code.
Get the unicode code of an emoji in base 16.
- String
input
: The emoji character.
- Number The unicode code.
Have an idea? Found a bug? See how to contribute.
See the LICENSE file.