Registry / serialization / emoji-api

emoji-api

JSON →
library3.0.1jsnpmunverified

The `emoji-api` library provides a simple, programmatic interface for working with emoji data in JavaScript and TypeScript applications. It allows developers to retrieve detailed information about specific emojis, list all available emojis, convert between emoji characters and their Unicode codepoints, and arrange emojis by their categories. The current stable version is 3.0.1, released as a patch shortly after the major v3.0.0 update, which introduced breaking changes. The library aims for simplicity and direct access to emoji metadata, including properties like `name`, `group`, `sub_group`, and `codepoints`, along with methods to generate Twemoji URLs and formatted names. It ships with TypeScript types, enhancing developer experience for type-safe applications, and supports both ESM and CommonJS module systems.

npm install emoji-api
INSTALL
IMPORT
SIG · EMOJI-API
E
emoji-api
serializationjavascriptv3.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

* as emoji
import * as emoji from 'emoji-api';
const emoji = require('emoji-api');
ESM import for the primary API object. CommonJS `require` is also supported but ESM is generally preferred in modern Node.js and browser environments.
arrange
import { arrange } from 'emoji-api';
const { arrange } = require('emoji-api');
Named import for the `arrange` function, which organizes emojis by category. Also available via CommonJS destructuring.
Emoji
import type { Emoji } from 'emoji-api';
import { Emoji } from 'emoji-api';
Import the `Emoji` type for type-checking when working with emoji objects. Do not import it as a runtime value.

Demonstrates basic usage of the `emoji-api` library, including retrieving emoji data, accessing properties, converting formats, and organizing emojis by category.

import * as emoji from 'emoji-api'; // Get detailed information about a specific emoji const pleadingFace = emoji.get('🥺'); console.log('Pleading Face Details:', pleadingFace); // Access specific properties console.log('Formatted Name:', pleadingFace.formattedName); // Pleading Face console.log('Twemoji URL:', pleadingFace.twemoji()); // https://twemoji.maxcdn.com/v/latest/72x72/1f97a.png // List all emojis const allEmojis = emoji.all(); console.log(`Total emojis available: ${allEmojis.length}`); // Convert between emoji and Unicode console.log('Unicode for 🥺:', emoji.emojiToUnicode('🥺')); // 1f97a console.log('Emoji for 1f97a:', emoji.unicodeToEmoji('1f97a')); // 🥺 // Arrange emojis by category import { arrange } from 'emoji-api'; const categorizedEmojis = arrange(); console.log('Emojis by category (sample):', Object.keys(categorizedEmojis).slice(0, 2));
Debug
Known issues
breakingVersion 3.0.0 introduced breaking changes. Code written for v2.x.x will likely need adjustments to work with v3.x.x.
fix
Refer to the v3.0.0 full changelog on GitHub for specific breaking changes. Review your usage of `emoji-api` methods and object structures for compatibility.
affects: >=3.0.0
gotchaThe `Emoji.fancyName` property was fixed in `v3.0.1`. If you rely on `fancyName` for consistent output, ensure you are on `v3.0.1` or newer.
fix
Upgrade to `emoji-api@3.0.1` or newer to ensure correct behavior of `Emoji.fancyName`. Use `npm install emoji-api@latest`.
affects: >=3.0.0 <3.0.1
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
emoji-api — npm install emoji-api · libregistry