Socket
Book a DemoInstallSign in
Socket

random-person

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

random-person

return random names and cities (weighted by population in U.S. census data).

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

random-name

return random names and cities (weighted by population in U.S. census data).

  var random = require('random-name')
  console.log(random());

  //provides first, middle, last, female, and male names.

  console.log(random.first())
  console.log(random.middle())
  console.log(random.last())
  console.log(random.female())
  console.log(random.male())

  //also, random place name!
  console.log(random.place())

  //or a person object with gender matching first and middle, and a state
  var person = random.person();
  console.log(person.full_name, "from", person.city + ", " + person.state);

also optionally builds names using markov chains

  var random = require('random-name')
  console.log(random(true));
  console.log(random.first(true))
  console.log(random.last(true))
  var person = random.person(true);

Taken from the U.S. census geneology website and the U.S. census population estimate

To make this more browser friendly, the .json files are limited to 500 entries

To regenerate the data using more entries edit MAX_COUNT in original_census_data/build_json.js and re-run the script: node original_census_data/build_json.js

License

MIT

FAQs

Package last updated on 05 Jul 2014

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