Socket
Socket
Sign inDemoInstall

gender-detection-from-name

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gender-detection-from-name

Gender detection from first name


Version published
Maintainers
1
Install size
928 kB
Created

Readme

Source

Gender detection from name

This simple project detects 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')

function main() {
  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

Keywords

FAQs

Last updated on 22 Oct 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc