Projects · What I'm known for

Emoji Mixer

Stable 2023 – now Author and maintainer

Node library that turns two emojis into a Google Emoji Kitchen image URL. Downloaded over 120,000 times and depended on by 1,200+ repositories.

20 photos

  • 🤖 + 👽
    🤖 + 👽
  • 🐶 + 🐱
    🐶 + 🐱
  • ☕ + 🌮
    ☕ + 🌮
  • 🎃 + 👻
    🎃 + 👻
  • 🌵 + 🐢
    🌵 + 🐢
  • 🦊 + 🍕
    🦊 + 🍕
  • 🌈 + 🐸
    🌈 + 🐸
  • 🍓 + 🐻
    🍓 + 🐻
  • 🔥 + 🧊
    🔥 + 🧊
  • 🦄 + 🍩
    🦄 + 🍩
  • 🐧 + 🎂
    🐧 + 🎂
  • 🍄 + 🐌
    🍄 + 🐌
  • 🐳 + 🌊
    🐳 + 🌊
  • 🥑 + 😎
    🥑 + 😎
  • 💀 + 🌹
    💀 + 🌹
  • 🐝 + 🌸
    🐝 + 🌸
  • 🧁 + 🐰
    🧁 + 🐰
  • 👻 + 🍭
    👻 + 🍭
  • 🦉 + 📚
    🦉 + 📚
  • 🤠 + 🐮
    🤠 + 🐮

Google's Emoji Kitchen combines two emojis into a new sticker, but there's no official API for it: you need to know which pairs exist and which release date each image was published under. emoji-mixer answers that question from a bundled compatibility database and builds the image URL.

import getEmojiMixUrl from "emoji-mixer";

getEmojiMixUrl("🤖", "👽");
// https://www.gstatic.com/android/keyboard/emojikitchen/20201001/u1f916/u1f916_u1f47d.png

Highlights#

  • 619 base emojis, 330,640 valid combinations, looked up in both directions and resolved to the newest published version of each pair.
  • 96 MB down to 2.4 MB. The raw compatibility data is huge and mostly repeated strings. I rewrote it into two lookup tables (unique codepoints and unique release dates) with each pair stored as a pair of indexes, which cut the shipped data by roughly 40x without losing anything.
  • Ships as both CommonJS and ES modules, with TypeScript declarations, so it drops into old and new Node projects alike.
  • A Python converter rebuilds the compressed database from Google's data when new mixes are published.

Where it came from#

It grew out of the alchemy command in a Discord bot I wrote for a roleplay server (grand-archives-discord-bot). Other people wanted the same lookup, so I pulled it out into a package, and it's now used by over a thousand repositories on GitHub.