MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / resolveVehicleType

Function resolveVehicleType

services/fipe/price.js:53–61  ·  view source on GitHub ↗
(vehicleType)

Source from the content-addressed store, hash-verified

51}
52
53function resolveVehicleType(vehicleType) {
54 const vehicleTypeMap = {
55 1: 'carro',
56 2: 'moto',
57 3: 'caminhao',
58 };
59
60 return vehicleTypeMap[vehicleType] || '';
61}
62
63async function getPrice({ referenceTable, vehicleType, model, fipeCode }) {
64 const [yearModel, fuelType] = model.valor.split('-');

Callers 1

getPriceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected