Skip to content

About

Generates random profiles based on ethnicity and age range

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

genRandomProfiles Module

Generates an array of user profile objects based on the specified ethnicity and age range.

Description

genRandomProfiles module creates mock user data for testing or development purposes. Each profile includes a unique login ID, full name, email address, and date of birth (DOB) derived from the age and ethnicity constraints.

Parameters

Name Type Description
ethnicities string[] Array of ethnicities to generate profiles from. Supported: "american", "russian", "chinese", "indian"
ageRange number[] Maximum age (inclusive). Profiles will be aged between ageRange[0] and ageRange[1].
count number Number of profiles to generate.

Returns

Object[] - An array of profile objects, each containing the following keys:

  • loginId (string): Unique identifier
  • fullName (string): Generated full name based on ethnicity
  • email (string): Email address
  • dob (ISODate): Date of birth

Example

const genRandomProfiles = require('genrandomprofiles');
const profiles = genRandomProfiles(["russian", "indian"], [18, 40], 10);
console.log(profiles[0]);
// {
//   loginId: "user1987",
//   fullName: "Vladimir Ivanov",
//   email: "vladimirivanov@gmail.com",
//   dob: "1987-11-05"
// }

About

Generates random profiles based on ethnicity and age range

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages