Interface Animal

Generator to generate animals.

interface Animal {
    animal(): string;
    animalType(): string;
    bird(): string;
    cat(): string;
    dog(): string;
    farmAnimal(): string;
    petName(): string;
}

Methods

  • Living creature with the ability to move, eat, and interact with its environment.

    Returns string

    a random animal

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

    let faker = new Faker(11)

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

    Output (formatted as JSON value)

    "crow"
    
  • Type of animal, such as mammals, birds, reptiles, etc..

    Returns string

    a random animal type

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.animal.animalType())
    }

    Output (formatted as JSON value)

    "amphibians"
    
  • Distinct species of birds.

    Returns string

    a random bird

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.animal.bird())
    }

    Output (formatted as JSON value)

    "lovebird"
    
  • Various breeds that define different cats.

    Returns string

    a random cat

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.animal.cat())
    }

    Output (formatted as JSON value)

    "Toyger"
    
  • Various breeds that define different dogs.

    Returns string

    a random dog

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.animal.dog())
    }

    Output (formatted as JSON value)

    "Staffordshire Bullterrier"
    
  • Animal name commonly found on a farm.

    Returns string

    a random farm animal

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.animal.farmAnimal())
    }

    Output (formatted as JSON value)

    "Cow"
    
  • Affectionate nickname given to a pet.

    Returns string

    a random pet name

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.animal.petName())
    }

    Output (formatted as JSON value)

    "Nacho"