IF Commons GitHub

logical/site

Written to: 5 requirements: 5 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-report-site FR-002, 0002-report-site FR-003, 0002-report-site FR-004, 0002-report-site FR-005, 0002-report-site FR-006

The site of a report (0002-report-site FR-002 to FR-006): an index of how each requirement stands with the counts of every standing and grade (never a percentage), a page for each requirement with its objectives, the evidence behind each with its origin, grade and age, and who answers for it, the stylesheet, and the data the pages are made from as JSON. The pages are plain HTML with one stylesheet: no script, no font or image or any other address, so that the report can be opened from a file, kept as evidence and read offline. Every text is escaped. The same input gives the same bytes.

import { escapeHtml } from "./site.ts";
escapeHtml("<b>"); // "&lt;b&gt;"

Source: commons/posture-report/src/logical/site.ts

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

logical.escapeHtmlfunctionno test imports it
function escapeHtml(s: string): string

Text made safe to put in HTML, in text and in a double-quoted attribute.

logical.pageNamefunctionno test imports it
function pageName(requirement: string): string

The file name of a requirement's page: only letters, digits, dots, dashes and underscores survive.

logical.buildSitefunctionno test imports it
function buildSite(input: ReportInput): Site

The files of the site of a report.

escapeHtmlfunction
function escapeHtml(s: string): string

Text made safe to put in HTML, in text and in a double-quoted attribute.

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

pageNamefunction
function pageName(requirement: string): string

The file name of a requirement's page: only letters, digits, dots, dashes and underscores survive.

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

buildSitefunction
function buildSite(input: ReportInput): Site

The files of the site of a report.

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

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