A simple NPM package for generating random names by country.
npm i random-name-by-country --save
const { randomName } = require("random-name-by-country");
console.log(randomName('US','M','full'));
// John Doe
console.log(randomName('US','M','fn'));
// John
console.log(randomName('US','M','sn'));
// Doe
1st Param | 2nd Param | 3rd Param |
---|---|---|
Country Abbreviation | Gender | Name type |
- US - USA
- MX - Mexico
- M - Male
- F - Female
- MF - Random Male & Female
- fn - Firstname
- sn - Surname
- full - Full name
Feel free to clone or fork this project: https://github.com/deanilvincent/random-name-by-country.git
This project is licensed under the MIT License - see the LICENSE.md file for details.