New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gender-detection-from-name

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gender-detection-from-name

Gender detection from first name

1.11.2
latest
Source
npm
Version published
Maintainers
0
Created
Source

Gender detection from name

Coverage Status Maintainability npm Donate

NPM

Library to detect the gender of a first name. An optional language parameter can be specified to improve the detection, for example: Andrea in EN is female, in IT is male. If no language is specified, all languages are considered. (issue #92)

Install

npm i gender-detection-from-name

Example

const { getGender } = require('gender-detection-from-name');

const genderEN = getGender('Andrea', 'en');
const genderIT = getGender('Andrea', 'it');
const genderES = getGender('Andrea', 'es');
const genderFR = getGender('Andrea', 'fr');
const genderDE = getGender('Andrea', 'de');
const genderTR = getGender('Radife', 'tr');
const gender = getGender('Jennifer');
console.log(genderEN); // female
console.log(genderIT); // male
console.log(genderES); // male
console.log(genderFR); // male
console.log(genderDE); // female
console.log(genderTR); // female
console.log(gender); // female

Supported languages

en, it, es, fr, de, tr

Run tests

npm test

Run lint

npm run lint

Contribute

Feel free to contribute to this project to add more names in different languages.

Author

  • Davide Violante

Keywords

gender

FAQs

Package last updated on 14 Jan 2025

Did you know?

Socket

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.

Install

Related posts