JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 32
  • Score
    100M100P100Q58159F

Easy list of gender terms in several languages.

Package Exports

  • @matsukky/gender
  • @matsukky/gender/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@matsukky/gender) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Gender

Easy list of gender terms in several languages.

English - French - Spanish - Italian - German - Japanese - Chinese - Arabic - Russian

This library provides a comprehensive way to handle gender representation in various languages. It includes gender data, localization support.

Table of Contents

Installation

To install the library, use npm, yarn or bun:

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

Usage

Load a specific language for gender terms.

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

await locale('fr');
const gender = Gender('F', { capitalize: true, custom: ['petite', 'petit·e', 'petit'] })
console.log(gender.genderName).genderName; // "Femme"
console.log(gender.genderName).custom; // "Petite"

Types

GenderCollection

export interface GenderCollection {
  F: GenderData;
  M: GenderData;
  X: GenderData;
}

GenderData

export interface GenderData {
  emoji: string;
  colors: string[];
  genderName: string;
  childTerm: string;
  adultTerm: string;
  subjectPronoun: string;
  objectPronoun: string;
  indirectPronoun: string;
  possessiveAdjective: string;
  reflexivePronoun: string;
  demonstrative: string;
  indeterminateArticle: string;
  genderAdjective: string;
  pluralSubjectPronoun: string;
  pluralPossessiveAdjective: string;
  custom: string | null
}

Avalaible Gender Key

Role Values
F F, ♀, WOMAN, GIRL, FEMALE
M M, H, ♂, MAN, MEN, BOY, MALE
X X, N, ⚧, NEUTRAL, HUMAN