Credentials Generator

This simple API generates a password, female or male name and surname, and a username. Specification:

// the method:
getRandomName(requirements: GeneratedPersonRequirements): GeneratedPerson

interface GeneratedPersonRequirements {
    randomGender?: boolean,                 // Generate gender randomly
    isMale?: boolean,                       // or set specific gender
    minimumUsernameLength?: number,         // Length of a username
    usernameWithANumber?: boolean           // Add random numbers to a username
}

interface GeneratedPerson {
    name: string,
    surname: string,
    username: string,
    password: string
}

Example:

const randomPerson = this.getRandomName({
    randomGender: true,
    minimumUsernameLength: 10,
    usernameWithANumber: true
})

const name = randomPerson.name;
const surname = randomPerson.surname;
const username = randomPerson.username;
const password = randomPerson.password;