A lib created to return all brands and models of vehicles in the world.
npm
npm install --save fetchicles
yarn
yarn add fetchicles
import { brands } from "fetchicles";
// Using the then method
brands("CAR").then(data => console.log(data));
import { brands } from "fetchicles";
// Using await inside an immediately invoked function
(async () => {
const carBrands = await brands("CAR");
console.log(carBrands);
})();
[
"Ford",
"Chevrolet",
"Fiat",
"Citroen",
"Honda",
"Hyundai",
"Renault",
"Toyota",
"Volkswagen",
]
And now, inside params it will be an object, with first parameter a vehicle name, as string, and second parameter a brand name as string.
import { models } from "fetchicles";
// Using the then method
models({ vehicle: "CAR", brand: "fiat" }).then(data => console.log(data));
import { models } from "fetchicles";
// Using await inside an immediately invoked function
(async () => {
const carModels = await models({ vehicle: "CAR", brand: "fiat" });
console.log(carModels);
})();
[
"Uno",
"Doblo",
"Pulse",
"Argo",
"Strada",
"Cronos",
"Mobi"
]
This will be standard for all vehicles (vehicle names must be uppercase).
Vehicles types available:
- CAR
- MOTORCYCLE
Read our contribution guide.
@mxtheussouza |
---|
This repository use MIT License.