Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.5 KB

README.md

File metadata and controls

30 lines (22 loc) · 1.5 KB

Gender detection from name

Coverage Status Maintainability 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, EN has priority.

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 gender = getGender('Jennifer');
console.log(genderEN); // female
console.log(genderIT); // male
console.log(gender); // female

Run tests

npm test

Run lint

npm run lint

Author