Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

infer-gender

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infer-gender - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

4

index.js

@@ -27,3 +27,5 @@ const fs = require('fs')

.replace(/[^a-z -]+/g, '')
.split(' ')[0]
.split(' ')
// Return the first word that matches a name
.find(name => name in names)
)

@@ -30,0 +32,0 @@

{
"name": "infer-gender",
"version": "1.1.2",
"version": "1.2.0",
"description": "Infer the gender of a name based on a large list of names, case insensitive and removes diacritics",

@@ -5,0 +5,0 @@ "scripts": {

@@ -34,2 +34,10 @@ const assert = require('assert')

})
it('It should return male even though first word does not match', () => {
infer('Abcde Alfonso Wayne', 'male')
})
it('It should return female even though first word does not match', () => {
infer('Abcde Ariana Matrix', 'female')
})
})

@@ -36,0 +44,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc