Skip to content

๐Ÿ”ฎ Get the unicode code of an emoji.

License

Notifications You must be signed in to change notification settings

tarouboy/emoji-unicode

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

30 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

emoji-unicode

Get the unicode code of an emoji.

Installation

$ npm i emoji-unicode

Example

"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

Documentation

emojiUnicode(input)

Get the unicode code of an emoji in base 16.

Params

  • String input: The emoji character.

Return

  • String The base 16 unicode code.

emojiunicode.raw(input)

Get the unicode code of an emoji in base 16.

Params

  • String input: The emoji character.

Return

  • Number The unicode code.

How to contribute

Have an idea? Found a bug? See how to contribute.

License

See the LICENSE file.

About

๐Ÿ”ฎ Get the unicode code of an emoji.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%