Skip to content

Vehicle

Module to generate vehicle related entries.

Overview

Most methods are related to cars/automobiles: a vehicle() name is comprised of a car manufacturer() and model(). You can also generate fuel(), type(), and color(), as well as typical car registration IDs vin() and vrm().

If you prefer two wheels, you can generate a bicycle() type instead.

bicycle

Returns a type of bicycle.

Available since v5.5.0

Returns: string

ts
function bicycle(): string;

Examples

ts
faker.vehicle.bicycle() // 'Hybrid Bicycle'

color

Returns a vehicle color.

Available since v5.0.0

Returns: string

ts
function color(): string;

Examples

ts
faker.vehicle.color() // 'orchid'

fuel

Returns a fuel type.

Available since v5.0.0

Returns: string

ts
function fuel(): string;

Examples

ts
faker.vehicle.fuel() // 'Gasoline'

manufacturer

Returns a manufacturer name.

Available since v5.0.0

Returns: string

ts
function manufacturer(): string;

Examples

ts
faker.vehicle.manufacturer() // 'Mazda'

model

Returns a vehicle model.

Available since v5.0.0

Returns: string

ts
function model(): string;

Examples

ts
faker.vehicle.model() // 'Golf'

type

Returns a vehicle type.

Available since v5.0.0

Returns: string

ts
function type(): string;

Examples

ts
faker.vehicle.type() // 'Minivan'

vehicle

Returns a random vehicle.

Available since v5.0.0

Returns: string

ts
function vehicle(): string;

Examples

ts
faker.vehicle.vehicle() // 'Mazda Model S'

vin

Returns a vehicle identification number (VIN).

Available since v5.0.0

Returns: string

ts
function vin(): string;

Examples

ts
faker.vehicle.vin() // 'JPKHDMEWYCVH59000'

vrm

Returns a vehicle registration number (Vehicle Registration Mark - VRM)

Available since v5.4.0

Returns: string

ts
function vrm(): string;

Examples

ts
faker.vehicle.vrm() // 'OS65LQL'

Released under the MIT License.