{"id":13124,"library":"emoji-api","title":"Emoji API Utility","description":"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.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/Archaeopteryx1/emoji-api","tags":["javascript","emoji","emoji-api","parser","emoji-parser","typescript"],"install":[{"cmd":"npm install emoji-api","lang":"bash","label":"npm"},{"cmd":"yarn add emoji-api","lang":"bash","label":"yarn"},{"cmd":"pnpm add emoji-api","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM import for the primary API object. CommonJS `require` is also supported but ESM is generally preferred in modern Node.js and browser environments.","wrong":"const emoji = require('emoji-api');","symbol":"* as emoji","correct":"import * as emoji from 'emoji-api';"},{"note":"Named import for the `arrange` function, which organizes emojis by category. Also available via CommonJS destructuring.","wrong":"const { arrange } = require('emoji-api');","symbol":"arrange","correct":"import { arrange } from 'emoji-api';"},{"note":"Import the `Emoji` type for type-checking when working with emoji objects. Do not import it as a runtime value.","wrong":"import { Emoji } from 'emoji-api';","symbol":"Emoji","correct":"import type { Emoji } from 'emoji-api';"}],"quickstart":{"code":"import * as emoji from 'emoji-api';\n\n// Get detailed information about a specific emoji\nconst pleadingFace = emoji.get('🥺');\nconsole.log('Pleading Face Details:', pleadingFace);\n\n// Access specific properties\nconsole.log('Formatted Name:', pleadingFace.formattedName); // Pleading Face\nconsole.log('Twemoji URL:', pleadingFace.twemoji());       // https://twemoji.maxcdn.com/v/latest/72x72/1f97a.png\n\n// List all emojis\nconst allEmojis = emoji.all();\nconsole.log(`Total emojis available: ${allEmojis.length}`);\n\n// Convert between emoji and Unicode\nconsole.log('Unicode for 🥺:', emoji.emojiToUnicode('🥺')); // 1f97a\nconsole.log('Emoji for 1f97a:', emoji.unicodeToEmoji('1f97a')); // 🥺\n\n// Arrange emojis by category\nimport { arrange } from 'emoji-api';\nconst categorizedEmojis = arrange();\nconsole.log('Emojis by category (sample):', Object.keys(categorizedEmojis).slice(0, 2));","lang":"typescript","description":"Demonstrates basic usage of the `emoji-api` library, including retrieving emoji data, accessing properties, converting formats, and organizing emojis by category."},"warnings":[{"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.","message":"Version 3.0.0 introduced breaking changes. Code written for v2.x.x will likely need adjustments to work with v3.x.x.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade to `emoji-api@3.0.1` or newer to ensure correct behavior of `Emoji.fancyName`. Use `npm install emoji-api@latest`.","message":"The `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.","severity":"gotcha","affected_versions":">=3.0.0 <3.0.1"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":""}