New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

unicode-name

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unicode-name

[Unicode 17.0.0] Returns the name, aliases, or label of a Unicode character or Emoji

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
20K
23.85%
Maintainers
1
Weekly downloads
 
Created
Source

unicode-name.js [ci]

Get the name of any Unicode character or Emoji in JavaScript! The purpose of this library is to return a useful name or label for any character/codepoint, even if it is special, unusual, or invalid. Also works with named characters constructed from multiple codepoints, like many Emoji characters.

Unicode version: 17.0.0 (September 2025)

Install

Use npm or your favorite package manager to install this module:

npm install unicode-name

Or use the ESM module directly in your browser.

Usage

unicodeName(char)

Returns the best name of the character or known codepoint sequence:

import { unicodeName } from "unicode-name";

// Return name of a character
unicodeName("A"); // "LATIN CAPITAL LETTER A"
unicodeName("🚡"); // "AERIAL TRAMWAY"
unicodeName("丁"); // "CJK UNIFIED IDEOGRAPH-4E01"
unicodeName("한"); // "HANGUL SYLLABLE HAN"

// Supports Unicode 17 (September 2025)
unicodeName("𑶰"); // "TOLONG SIKI LETTER I"

// Can be used with integers representing codepoint values
unicodeName(48); // "DIGIT ZERO"
unicodeName(9450); // "CIRCLED DIGIT ZERO"

// Returns useful alias for control characters
unicodeName("\0"); // "NULL"
unicodeName("\t"); // "CHARACTER TABULATION"

// Applies Unicode's name corrections
unicodeName("Ƣ"); // "LATIN CAPITAL LETTER GHA", not "LATIN CAPITAL LETTER OI"

// Uses codepoint labels for special / unassigned areas of the codepoint spectrum
unicodeName("󿿿"); // "<noncharacter-FFFFF>"
unicodeName("𐱐"); // "<reserved-10C50>"
unicodeName("󿿽"); // "<private-use-FFFFD>"
unicodeName(String.fromCodePoint(55296)); // "<surrogate-D800>"

// Supports characters made from codepoint sequences
unicodeName("‼︎"); // "DOUBLE EXCLAMATION MARK (text style)"
unicodeName("㓟︀"); // "CJK COMPATIBILITY IDEOGRAPH-2F81F"
unicodeName("င︀"); // "MYANMAR LETTER NGA (dotted form)"
unicodeName("நி"); // "TAMIL SYLLABLE NI"
unicodeName("🇺🇳"); // "FLAG: UNITED NATIONS"
unicodeName("🏴󠁧󠁢󠁳󠁣󠁴󠁿"); // "SCOTLAND"
unicodeName("🧑‍🦱"); // "PERSON: CURLY HAIR"
unicodeName("👨‍🍼"); // "MAN FEEDING BABY"
unicodeName("❤️‍🔥"); // "HEART ON FIRE"
unicodeName("🫱🏻‍🫲🏾"); // "HANDSHAKE: LIGHT SKIN TONE, MEDIUM-DARK SKIN TONE"
unicodeName("🐦‍⬛"); // "BLACK BIRD"
unicodeName("🙂‍↔️"); // "HEAD SHAKING HORIZONTALLY"
unicodeName("‘︁"); // "LEFT SINGLE QUOTATION MARK (right-justified fullwidth form)"

Please note: Supports single characters the Unicode standard recognizes (which can be composed out of one ore more codpoints). The return value for string with more than one character is always undefined.

unicode […] Name(char) Functions

Additional, more specfic name functions (e.g. getting aliases for a codepoint) are available too, see DOCS or SPECS for more info.

Also see

MIT License

Keywords

unicode

FAQs

Package last updated on 09 Sep 2025

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