Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
gender-api-client
Advanced tools
Guess the gender for a given name. Uses the gender-api.com API.
Get the gender for any given name. This is a client for the gender-api.com API.
Really simple:
var gender = require('gender-api-client')
gender('Max', function(err, gender) {
if (err) return console.err(error)
console.log('The gender is: ' + gender) // male
})
Instead of a name you can also provide an email address and gender-api.com will try to read any names from it.
var gender = require('gender-api-client')
gender('max.gfeller@gmail.com', function(err, gender) {
if (err) return console.err(error)
console.log('The gender is: ' + gender) // male
})
It is also possible to provide an array of names instead of only one. You will then get an object with all the names as keys and the genders as value back.
var gender = require('gender-api-client')
gender(['Max', 'Lisa'], function(err, genders) {
if (err) return console.err(error)
console.log('The gender of Lisa is: ' + genders['lisa'])
})
There are a few additional options that you can provide:
key
: An API keyip
: This is to determine from where a user iscountry
: Names can have different genders in different countrieslanguage
: Names can have different genders in different languagesExample:
var gender = require('gender-api-client')
gender('Andrea', { country: 'Germany' }, function(err, gender) {
if (err) return console.err(error)
console.log('The gender is: ' + gender) // Andrea is female in Germany...
})
gender('Andrea', { country: 'Italy' }, function(err, gender) {
if (err) return console.err(error)
console.log('The gender is: ' + gender) // ...but male in Italy
})
Without using a key you can run 50 requests a day. By registering to their service (for free) you can use 1000 requests a month.
If you need to do more you can buy additional requests.
npm test
(Keep in mind that this does actual requests to the API, especially if you are not registered)
FAQs
Guess the gender for a given name. Uses the gender-api.com API.
The npm package gender-api-client receives a total of 5 weekly downloads. As such, gender-api-client popularity was classified as not popular.
We found that gender-api-client demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.