npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

simple-emoji-map

v1.0.0

Published

A simple emoji map that can be built at any time

Readme

simple-emoji-map

A simple emoji map package that builds its data whenever it's installed.

This package maps the emoji codes (2049) or unicode () and sets them equal to its shortnames (["interrobang","exclamation_question"]).

The data generated by this package comes from emojibase-data, released under the MIT License.

Usage

Since v1.0.0, this package switched to a peer dependency model to allow you to choose the Unicode/Emoji version based on the emojibase-data version you choose. Make sure to install it!

To ensure that the emoji data is always up-to-date, I recommend adding a postinstall script in your consumer package.json, using the corresponding package manager's command. This will re-run the build script any time dependencies are installed, avoiding potential issues in the future where emojibase is updated but the script is not run.

"scripts": {
  "postinstall": "npm rebuild simple-emoji-map",
  "postinstall": "pnpm rebuild simple-emoji-map",
  "postinstall": "yarn run simple-emoji-map" 
}

Then to use the data:

const emojis = require('simple-emoji-map');
const { variants } = require('simple-emoji-map');

Or using ES6 imports:

import emojis from 'simple-emoji-map';
import { variants } from 'simple-emoji-map';

Rebuilding

The JSON file is automatically generated on install.

To rebuild the JSON data file, it's a pretty simple process.

const build = require('simple-emoji-map/build');
// import build from 'simple-emoji-map/build';

build();

Config

To customize the build process, you will need either a .simple-emoji-map file or a simple-emoji-map property in package.json.

The shortcodes option selects which data set to use for the emoji codenames (see https://github.com/milesj/emojibase/tree/emojibase-data%407.0.1/packages/data/en/shortcodes).

The cldr and cldr-native values look to be supported in most languages (if not all), but the rest (emojibase, emojibase-legacy, github, etc) look to only exist for English.

{
  "lang": "en",
  "shortcodes": {
    "dataset": "emojibase",
    "lang": null,

    "fallbackDataset": null,
    "fallbackLang": null
  },

  "shortnames": {},
  "type": "emoji", // or 'codepoint',
  "regex": null // regex for whitelist
}

Shortnames

This is also the way to add custom shortnames to the map file.

For example, if you want car to show the emoji for red_car (1f697), the file or property would look something like this:

{
    "shortnames": {
        "1f697": ["car"]
    }
}

Keep in mind this will not replace any existing shortnames, only add to the emoji code's list.