
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@matsukky/gender
Advanced tools
Lightweight, dependency-free library for gender-specific terms in multiple languages
A minimalist library that provides a comprehensive way to handle gender representation in various languages. Zero dependencies, tree-shakeable, and type-safe.
npm install @matsukky/gender
# or
yarn add @matsukky/gender
# or
bun add @matsukky/gender
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"
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"
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.
import gender from '@matsukky/gender';
const result = gender('F', { capitalize: true });
console.log(result.genderName); // "Woman"
console.log(result.childTerm); // "Girl"
gender(type: AvalaibleGender, options?: {
capitalize?: boolean;
custom?: Record<string, Record<'F' | 'M' | 'X', string>>;
language?: AvalaibleLanguage;
}): GenderData
locale(language: AvalaibleLanguage, define?: boolean): Promise<GenderCollection>
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." |
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 |
FAQs
Easy list of gender terms in several languages.
The npm package @matsukky/gender receives a total of 14 weekly downloads. As such, @matsukky/gender popularity was classified as not popular.
We found that @matsukky/gender demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.