🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

emoji-unicode-version

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emoji-unicode-version

Get the unicode version for a given emoji name

0.3.0
latest
Source
npm
Version published
Weekly downloads
193
46.21%
Maintainers
1
Weekly downloads
 
Created
Source

npm

emoji-unicode-version

Get the unicode version for a given emoji name.

Useful for testing native unicode emoji support. Test a single emoji and assume any other emoji with that same version is supported.

npm install emoji-unicode-version

Usage

const emojiNameToUnicodeVersion = require('emoji-unicode-version');

// 6.1
console.log(emojiNameToUnicodeVersion('grinning'));
// 9.0
console.log(emojiNameToUnicodeVersion('rofl'));

Get version from unicode

const emojiNameToUnicodeVersion = require('emoji-unicode-version');
const emojione = require('emojione');

function unicodeToName(emojiUnicode) {
	const emojiShortName = emojione.toShort(emojiUnicode);
	const emojiName = emojiShortName.slice(1, emojiShortName.length - 1);
	return emojiName;
}

// grinning, 6.1
console.log(emojiNameToUnicodeVersion(unicodeToName('😀')));
// rofl, 9.0
console.log(emojiNameToUnicodeVersion(unicodeToName('🤣')));

About

Emoji name list is pulled from EmojiOne

We grab the emoji unicode versions from Emojipedia.

ZWJ sequences use the unicode version for the highest individual emoji in the sequence.

Also See

Keywords

emoji

FAQs

Package last updated on 25 Mar 2019

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