mediaTypeOffunctionfunction mediaTypeOf(path: string): string | undefinedThe media type the extension of the last segment of a path says, or nothing.
The media type a path's name says: a closed table of the extensions of the files a fleet and its documents are made of, so that a catalog can ask for the kind of a file without reading it. A name with no extension in the table has none, and nothing is guessed from the bytes.
import { mediaTypeOf } from "./media.ts";
mediaTypeOf("fleet/olympia/asset.json"); // "application/json"
mediaTypeOf("README"); // undefinedmediaTypeOffunctionfunction mediaTypeOf(path: string): string | undefinedThe media type the extension of the last segment of a path says, or nothing.