A collection of vehicle manufacturer logos. All logos are registered trademarks of their respective owners.
npm i node-vehicle-logosThe assets directory contains SVGs of all the available logos. There is also makes.json file which contains the definition for each make, including possible alternative names. In some cases where a logo may contain text, there may also be "short" version. For example
| rolls-royce | rolls-royce-short |
|---|---|
In addition, there are some SVG assets for generic vehicle types:
The package also includes some typescript helpers and constants:
This is an the list of definitions from makes.json exported as a ReadonlyArray<Readonly<VehicleMake>>.
findMake is a function that can take a string and find the best matching make using the VehicleMake.name and VehicleMake.altNames. It can also take:
- an optional
MatchTypeproperty to specify what kind of match to use. Defaults tofullif not specified
import { findMake, MatchType, VehicleMake, VehicleMakes } from "node-vehicle-logos";
const bmw1 = findMake("BMW", VehicleMakes);
const bmw2 = findMake("2020 BMW i8", VehicleMakes, "contains");
const bmw3 = findMake("BMW i8", VehicleMakes, "start");
const bmw4 = findMake("2020 BMW", VehicleMakes, "end");
const notFound = findMake("BMW i8", VehicleMakes); // Returns undefined as 'BMW i8' is not a full match