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 πŸ™

Β© 2025 – Pkg Stats / Ryan Hefner

node-emojis

v1.0.0

Published

Modern, tree-shakeable emoji library for Node.js with TypeScript, search, skin tones, and aliases πŸŽ‰

Readme

npm version npm downloads CI bundle size TypeScript license

node-emojis πŸŽ‰

A modern, tree-shakeable emoji library for Node.js and browsers with TypeScript support.

✨ Features

  • 🌳 Tree-shakeable - Import only what you need
  • πŸ“¦ 360+ emojis from Unicode 1.0 to 15.0
  • πŸ” Smart search with keyword matching
  • 🎨 Skin tone support for 150+ human emojis
  • πŸ”„ Emoji aliases (thumbsup/+1/thumbs_up)
  • πŸ“ TypeScript support with full type definitions
  • πŸš€ Zero dependencies
  • ⚑ Optimized for performance

πŸ“‹ Requirements

  • Node.js 20.0.0 or higher
  • TypeScript 5.0+ (for TypeScript users)

πŸ“¦ Installation

npm install node-emojis

πŸš€ Quick Start

// Import everything (backward compatible)
const emojis = require('node-emojis')
console.log(emojis.fire) // πŸ”₯

// Import only what you need (recommended)
const { search } = require('node-emojis/search')
const { applySkinTone } = require('node-emojis/skin-tones')

ES Modules

import emojis from 'node-emojis'
import { search } from 'node-emojis/search'
import { applySkinTone } from 'node-emojis/skin-tones'

πŸ“– API

Basic Usage

const emojis = require('node-emojis')

// Access emojis directly
emojis.fire        // πŸ”₯
emojis.pizza       // πŸ•
emojis.unicorn     // πŸ¦„
emojis['+1']       // πŸ‘ (alias support)

πŸ” Search

const { search, getByCategory } = require('node-emojis/search')

// Search by keyword
const results = search('happy')
// Returns: [{ name: 'smile', emoji: '😊', keywords: [...], score: 0.8 }, ...]

// Get all emojis in a category
const animals = getByCategory('animals')
// Returns: [{ name: 'dog', emoji: 'πŸ•', ... }, ...]

🎨 Skin Tones

const { applySkinTone, supportsSkinTone, getAllSkinToneVariations } = require('node-emojis/skin-tones')

// Apply skin tone
applySkinTone('πŸ‘‹', 'medium')     // πŸ‘‹πŸ½
applySkinTone('πŸ‘‹', '3')          // πŸ‘‹πŸ½ (Fitzpatrick scale)

// Check if emoji supports skin tones
supportsSkinTone('wave')          // true
supportsSkinTone('fire')          // false

// Get all variations
getAllSkinToneVariations('πŸ‘‹')
// { light: 'πŸ‘‹πŸ»', 'medium-light': 'πŸ‘‹πŸΌ', medium: 'πŸ‘‹πŸ½', ... }

πŸ”„ Aliases

const { getAliases, getPrimaryName, isSameEmoji } = require('node-emojis/aliases')

// Get aliases
getAliases('fire')                // ['flame', 'hot', 'lit', 'snapstreak']

// Get primary name
getPrimaryName('+1')              // 'thumbs_up'

// Check if two names refer to the same emoji
isSameEmoji('thumbsup', '+1')     // true

🎯 Filters

const { filterByCategory, filterByVersion, filterByKeyword } = require('node-emojis/filters')

// Filter by category
const foods = filterByCategory('food')

// Filter by Unicode version
const modernEmojis = filterByVersion('10.0', 'min')  // Unicode 10.0+
const oldEmojis = filterByVersion('1.0', 'exact')    // Only Unicode 1.0

// Filter by keyword
const hearts = filterByKeyword('heart')

πŸ”§ Utilities

const { getNameFromEmoji, isValidEmoji, isValidEmojiName } = require('node-emojis')

// Reverse lookup
getNameFromEmoji('πŸ”₯')            // 'fire'

// Validation
isValidEmoji('πŸ”₯')                // true
isValidEmojiName('fire')          // true

🌲 Tree Shaking

Import only what you need to minimize bundle size:

// ❌ Imports entire library
import emojis from 'node-emojis'

// βœ… Imports only search functionality
import { search } from 'node-emojis/search'

// βœ… Import multiple features
import { search } from 'node-emojis/search'
import { applySkinTone } from 'node-emojis/skin-tones'
import { getAliases } from 'node-emojis/aliases'

πŸ“Š Bundle Size Comparison

| Import Style | Size (minified) | |-------------|-----------------| | Full library | ~85KB | | Search only | ~15KB | | Skin tones only | ~8KB | | Aliases only | ~6KB | | Direct data import | ~60KB |

πŸ“š Documentation

For comprehensive documentation, examples, and guides:

🎯 Examples

See the examples directory for more usage examples:

🀝 Contributing

Contributions are welcome! Please see our Contributing Guide for details.

We use Conventional Commits for commit messages.

πŸ“„ License

MIT Β© Jesse Palmer

πŸ™ Acknowledgments

Emoji data sourced from Unicode.org and Emojipedia.