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
function bicycle(): string;
Examples
faker.vehicle.bicycle() // 'Adventure Road Bicycle'
Source
color
Returns a vehicle color.
Available since v5.0.0
Returns: string
function color(): string;
Examples
faker.vehicle.color() // 'red'
Source
fuel
Returns a fuel type.
Available since v5.0.0
Returns: string
function fuel(): string;
Examples
faker.vehicle.fuel() // 'Electric'
Source
manufacturer
Returns a manufacturer name.
Available since v5.0.0
Returns: string
function manufacturer(): string;
Examples
faker.vehicle.manufacturer() // 'Ford'
Source
model
Returns a vehicle model.
Available since v5.0.0
Returns: string
function model(): string;
Examples
faker.vehicle.model() // 'Explorer'
Source
type
Returns a vehicle type.
Available since v5.0.0
Returns: string
function type(): string;
Examples
faker.vehicle.type() // 'Coupe'
Source
vehicle
Returns a random vehicle.
Available since v5.0.0
Returns: string
function vehicle(): string;
Examples
faker.vehicle.vehicle() // 'BMW Explorer'
Source
vin
Returns a vehicle identification number (VIN).
Available since v5.0.0
Returns: string
function vin(): string;
Examples
faker.vehicle.vin() // 'YV1MH682762184654'
Source
vrm
Returns a vehicle registration number (Vehicle Registration Mark - VRM)
Available since v5.4.0
Returns: string
function vrm(): string;
Examples
faker.vehicle.vrm() // 'MF56UPA'