emojibase
Lightweight, spec-compliant emoji datasets, regex patterns, and utility functions
Repository Health
Technical Analysis
emojibase is the core utility package of the Emojibase monorepo, a collection of lightweight, up-to-date, pre-generated emoji JSON datasets, regex patterns, and helper functions built directly from the official Unicode emoji data source files and CLDR annotations. The core package provides functions for fetching, flattening, and transforming emoji data (codepoint/hexcode/unicode conversions, shortcode joining, skin-tone handling) that pair with the companion emojibase-data (localized datasets) and emojibase-regex (matching patterns) packages.
Because the datasets are regenerated from the Unicode Technical Standard #51 and CLDR releases on every emoji spec update, consumers avoid hand-maintaining emoji metadata and get localized shortcodes/annotations across dozens of locales for free.
What You Get
- Data-fetching helpers (
fetchEmojis,fetchMessages,fetchShortcodes,fetchFromCDN) for loading bundled or CDN-hosted emoji datasets - Codepoint/hexcode/unicode conversion utilities (
fromCodepointToUnicode,fromHexcodeToCodepoint,fromUnicodeToHexcode,stripHexcode) - Shortcode utilities (
joinShortcodes,joinShortcodesToEmoji) for building emoji-to-shortcode lookup structures - Skin-tone and emoticon helpers (
appendSkinToneIndex,generateEmoticonPermutations) - Companion packages
emojibase-data(localized emoji JSON per Unicode/CLDR release) andemojibase-regex(ready-made matching regex patterns)
Common Use Cases
- Building an emoji picker UI with localized names/shortcodes/search across many languages
- Parsing or matching emoji characters in user-generated text (chat apps, comment systems)
- Converting between emoji representations (unicode character, hexcode, codepoint) when building custom emoji storage or transmission formats
- Rendering platform-specific emoji sets (Twemoji, Noto, etc.) using an up-to-date data source keyed to current Unicode/CLDR releases
Under The Hood
Architecture — emojibase is a Lerna-managed monorepo (lerna.json, Yarn workspaces) split into five packages under packages/: core (this package — the utility functions), data (generated per-locale JSON emoji datasets), regex (generated matching patterns), generator (the build tooling that produces data/regex from Unicode/CLDR source files), and test-utils. The core package’s src/index.ts re-exports a flat set of single-purpose modules (one file per function: fetchEmojis.ts, flattenEmojiData.ts, stripHexcode.ts, etc.), keeping each unit independently testable and tree-shakeable.
Tech Stack — TypeScript throughout (92.5% of the codebase), built with Babel (babel.config.js) and published via packemon in both ESM and CommonJS (lib/esm output directories) targeting the browser platform, Node >=18.12.0. The generator package is the actual data pipeline that ingests Unicode emoji-data files and CLDR annotation XML to regenerate emojibase-data on each spec release, decoupling data freshness from the core library’s release cadence.
Code Quality — Each exported function in packages/core/src has a matching test file under packages/core/tests/ (e.g. fetchMessages.test.ts, joinShortcodesToEmoji.test.ts, generateEmoticonPermutations.test.ts), run via Jest (jest.config.js, shared tests/setup.ts). The one-function-per-file convention combined with 1:1 test coverage keeps the surface easy to audit, though the project’s low recent commit velocity means some tooling (Babel-based build, Lerna) is dated relative to current monorepo conventions.
API Design — The package favors small, composable, single-purpose functions over a monolithic API object, which keeps bundle size low for consumers who only need a subset (e.g. just stripHexcode). This does mean assembling a full emoji-picker feature requires wiring several of these packages (core + data + regex) together rather than a single all-in-one import, which raises the initial integration cost slightly.
Used by 4 apps in this directory
GitButler
Developer Tools · Devops · AI Development
Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.
Huly Platform
Project Management · Team Chat · Collaboration
Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.
Mastodon
Social Media
Run your own federated social network on the open ActivityPub standard with no ads, no algorithms, and no corporate control over your community.
Rocket.Chat
Team Chat
The secure, self-hosted team communications platform for organizations that cannot compromise on data sovereignty.