Interface Person

Generator to generate people's personal information.

interface Person {
    email(): string;
    firstName(): string;
    gender(): string;
    hobby(): string;
    lastName(): string;
    middleName(): string;
    name(): string;
    namePrefix(): string;
    nameSuffix(): string;
    person(): Record<string, unknown>;
    phone(): string;
    phoneFormatted(): string;
    school(): string;
    ssn(): string;
    teams(people: string[], teams: string[]): Record<string, string[]>;
}

Methods

  • Electronic mail used for sending digital messages and communication over the internet.

    Returns string

    a random email

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.email())
    }

    Output (formatted as JSON value)

    "josiahthiel@luettgen.biz"
    
  • The name given to a person at birth.

    Returns string

    a random first name

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.firstName())
    }

    Output (formatted as JSON value)

    "Josiah"
    
  • Classification based on social and cultural norms that identifies an individual.

    Returns string

    a random gender

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.gender())
    }

    Output (formatted as JSON value)

    "male"
    
  • An activity pursued for leisure and pleasure.

    Returns string

    a random hobby

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.hobby())
    }

    Output (formatted as JSON value)

    "Candy making"
    
  • The family name or surname of an individual.

    Returns string

    a random last name

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.lastName())
    }

    Output (formatted as JSON value)

    "Abshire"
    
  • Name between a person's first name and last name.

    Returns string

    a random middle name

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.middleName())
    }

    Output (formatted as JSON value)

    "Sage"
    
  • The given and family name of an individual.

    Returns string

    a random name

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.name())
    }

    Output (formatted as JSON value)

    "Josiah Thiel"
    
  • A title or honorific added before a person's name.

    Returns string

    a random name prefix

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.namePrefix())
    }

    Output (formatted as JSON value)

    "Mr."
    
  • A title or designation added after a person's name.

    Returns string

    a random name suffix

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.nameSuffix())
    }

    Output (formatted as JSON value)

    "Sr."
    
  • Personal data, like name and contact details, used for identification and communication.

    Returns Record<string, unknown>

    a random person

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.person())
    }

    Output (formatted as JSON value)

    {"FirstName":"Josiah","LastName":"Thiel","Gender":"male","SSN":"558821916","Image":"https://picsum.photos/367/273","Hobby":"Winemaking","Job":{"Company":"Headlight","Title":"Administrator","Descriptor":"Chief","Level":"Configuration"},"Address":{"Address":"6992 Inletstad, Las Vegas, Rhode Island 82271","Street":"6992 Inletstad","City":"Las Vegas","State":"Rhode Island","Zip":"82271","Country":"Sweden","Latitude":-75.921372,"Longitude":109.436476},"Contact":{"Phone":"4361943393","Email":"janisbarrows@hessel.net"},"CreditCard":{"Type":"Discover","Number":"4525298222125328","Exp":"01/29","Cvv":"282"}}
    
  • Numerical sequence used to contact individuals via telephone or mobile devices.

    Returns string

    a random phone

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.phone())
    }

    Output (formatted as JSON value)

    "7053883851"
    
  • Formatted phone number of a person.

    Returns string

    a random phone formatted

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.phoneFormatted())
    }

    Output (formatted as JSON value)

    "1-053-883-8516"
    
  • An institution for formal education and learning.

    Returns string

    a random school

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.school())
    }

    Output (formatted as JSON value)

    "Valley View Private Middle School"
    
  • Unique nine-digit identifier used for government and financial purposes in the United States.

    Returns string

    a random ssn

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.ssn())
    }

    Output (formatted as JSON value)

    "853698829"
    
  • Randomly split people into teams.

    Parameters

    • people: string[]

      Strings

    • teams: string[]

      Strings

    Returns Record<string, string[]>

    a random teams

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.person.teams(["none","how","these","keep","trip","congolese","choir","computer","still","far"],["unless","army","party","riches","theirs","instead","here","mine","whichever","that"]))
    }

    Output (formatted as JSON value)

    {"army":["congolese"],"riches":["choir"],"theirs":["still"],"that":["none"],"unless":["these"],"party":["far"],"instead":["trip"],"here":["computer"],"mine":["how"],"whichever":["keep"]}