Interface Car

Generator to generate car related entries.

interface Car {
    car(): Record<string, unknown>;
    carFuelType(): string;
    carMaker(): string;
    carModel(): string;
    carTransmissionType(): string;
    carType(): string;
}

Methods

  • Wheeled motor vehicle used for transportation.

    Returns Record<string, unknown>

    a random car

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

    let faker = new Faker(11)

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

    Output (formatted as JSON value)

    {"Type":"Passenger car compact","Fuel":"CNG","Transmission":"Automatic","Brand":"Daewoo","Model":"Thunderbird","Year":1905}
    
  • Type of energy source a car uses.

    Returns string

    a random car fuel type

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.car.carFuelType())
    }

    Output (formatted as JSON value)

    "Ethanol"
    
  • Company or brand that manufactures and designs cars.

    Returns string

    a random car maker

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.car.carMaker())
    }

    Output (formatted as JSON value)

    "Lancia"
    
  • Specific design or version of a car produced by a manufacturer.

    Returns string

    a random car model

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.car.carModel())
    }

    Output (formatted as JSON value)

    "Tucson 4wd"
    
  • Mechanism a car uses to transmit power from the engine to the wheels.

    Returns string

    a random car transmission type

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.car.carTransmissionType())
    }

    Output (formatted as JSON value)

    "Manual"
    
  • Classification of cars based on size, use, or body style.

    Returns string

    a random car type

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

    let faker = new Faker(11)

    export default function () {
    console.log(faker.car.carType())
    }

    Output (formatted as JSON value)

    "Passenger car compact"