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

@matsukky/gender

v0.1.6

Published

Easy list of gender terms in several languages.

Readme

A minimalist library that provides a comprehensive way to handle gender representation in various languages. Zero dependencies, tree-shakeable, and type-safe.

Table of Contents

Installation

npm install @matsukky/gender
# or
yarn add @matsukky/gender
# or
bun add @matsukky/gender

Features

  • 🪶 Lightweight
  • 📦 Zero dependencies
  • 🌍 Support for multiple languages
  • 🎨 Color schemes for each gender
  • 🔄 Custom properties support
  • 🔠 Automatic capitalization
  • 📝 Rich set of gender-specific terms
  • 💪 Fully typed (TypeScript)

Usage

Basic Usage

import gender from '@matsukky/gender';

const female = gender('F');
console.log(female.genderName);    // "woman"
console.log(female.childTerm);     // "girl"
console.log(female.emoji);         // "🚺"

const male = gender('MALE');       // Alias support
console.log(male.genderName);      // "man"
console.log(male.colors.primary);  // "#1e90ff"

const neutral = gender('X');
console.log(neutral.genderName);   // "person"

Localization

import gender, { locale } from '@matsukky/gender';

// Load French locale
await locale('fr');

const female = gender('F');
console.log(female.genderName);    // "femme"
console.log(female.childTerm);     // "fille"

Custom Properties

import gender from '@matsukky/gender';

// Definition of context-specific terms
const result = gender('F', {
  custom: {
    occupation: {
      F: "actress",
      M: "actor",
      X: "performer"
    },
    workplace: {
      F: "actresses' room",
      M: "actors' room",
      X: "performers' room"
    },
    award: {
      F: "best actress",
      M: "best actor",
      X: "best performance"
    }
  }
});

// Basic usage
console.log(result.occupation);     // "actress"
console.log(result.workplace);      // "actresses' room"

// Combination with standard properties
console.log(`${result.title} ${result.genderName}`);          // "Mrs woman"
console.log(`${result.occupation} ${result.objectPronoun}`);   // "actress her"

// Usage with capitalization
const capitalizedResult = gender('F', {
  capitalize: true,
  custom: {
    occupation: {
      F: "actress",
      M: "actor",
      X: "performer"
    }
  }
});

console.log(capitalizedResult.occupation);  // "Actress"

The gender function allows extending standard properties with custom terms while maintaining gender consistency. Each custom property must define a value for all three genders (F, M, X) to ensure inclusive usage.

Capitalization

import gender from '@matsukky/gender';

const result = gender('F', { capitalize: true });
console.log(result.genderName);    // "Woman"
console.log(result.childTerm);     // "Girl"

API Reference

gender(type, options)

gender(type: AvalaibleGender, options?: {
  capitalize?: boolean;
  custom?: Record<string, Record<'F' | 'M' | 'X', string>>;
  language?: AvalaibleLanguage;
}): GenderData

locale(language, define?)

locale(language: AvalaibleLanguage, define?: boolean): Promise<GenderCollection>

Types

GenderData Properties

| Property | Description | Example (Female) | |-------------------------|--------------------------------|-------------------| | emoji | Gender emoji | 🚺 | | colors | Color palette object | { rose, petal, bloom, blush, berry } | | genderName | Gender name | "woman" | | childTerm | Term for child | "girl" | | adultTerm | Term for adult | "woman" | | combined | Mostly used in social media as pronouns | "she/her" | subjectPronoun | Subject pronoun | "she" | | objectPronoun | Object pronoun | "her" | | indirectPronoun | Indirect pronoun | "her" | | possessiveAdjective | Possessive adjective | "her" | | reflexivePronoun | Reflexive pronoun | "herself" | | demonstrative | Demonstrative pronoun | "she" | | indeterminateArticle | Indeterminate article | "a" | | genderAdjective | Gender adjective | "female" | | pluralSubjectPronoun | Plural subject pronoun | "they" | | pluralPossessiveAdj | Plural possessive adjective | "their" | | title | Full honorific title | "Mrs." | | shortTitle | Short honorific title | "Ms." |

Avalaible Gender Keys

| Role | Values | |------|-------------------------------------------| | F | F, ♀, WOMAN, GIRL, FEMALE, SHE, HER | | M | M, H, ♂, MAN, MEN, BOY, MALE, HE, HIM | | X | X, N, ⚧, NEUTRAL, HUMAN, THEY, THEM |