IF Commons GitHub

governance/media

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-sql-governance FR-004

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"); // undefined

Source: commons/anyfs-sql/src/governance/media.ts

1 of 1 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

mediaTypeOffunction
function mediaTypeOf(path: string): string | undefined

The media type the extension of the last segment of a path says, or nothing.

Imported by 4 tests of the run (4 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.