Airline
Several methods in this module return objects rather than strings. For example, you can use
{{$airline.airportIataCode}}
to pick out the specific property you need.{{$airline.airportName}}
and {{$airline.airportIataCode}}
.{{$airline.airlineName}}
and {{$airline.airlineIataCode}}
.{{$airline.flightNumber}}
, {{$airline.airplaneName}},
be allocated a {{$airline.seat}}
and {{$airline.recordLocator}}
.aircraftType
airline
faker.airline.airline()
method has been refined into two more precise variables:{{$airline.airlineName}}
: Generates an airline name.{{$airline.airlineIataCode}}
: Generates an airline IATA code.
airplane
faker.airline.airplane()
method has been refined into two more precise variables:{{$airline.airplaneName}}
: Generates an airplane name.{{$airline.airplaneIataTypeCode}}
: Generates an airplane IATA code.
airport
faker.airline.airport()
method has been refined into two more precise variables:{{$airline.airportName}}
: Generates an airport name.{{$airline.airportIataCode}}
: Generates an airport IATA code.
flightNumber
American Airlines flight 425
) and sometimes with leading zeros, often with the airline code prepended (e.g.: AA0425
).airline()
function and use template literals:
Name | Type | Default | Description |
---|---|---|---|
addLeadingZeros | boolean | false | Whether to pad the flight number up to 4 digits with leading zeros. |
length | number | { min: number; max: number; } | { min: 1, max: 4 } |
recordLocator
Name | Type | Default | Description |
---|---|---|---|
allowNumerics | boolean | false | Whether to allow numeric characters. |
allowVisuallySimilarCharacters | boolean | false | Whether to allow visually similar characters such as '1' and 'I'. |
seat
Name | Type | Default | Description |
---|---|---|---|
aircraftType | 'narrowbody' | 'regional' | 'widebody' | narrowbody | The aircraft type. Can be one of narrowbody , regional , widebody . |