IF Commons GitHub

governance/subjects

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0028-modules FR-008

Subjects (commons data 0028-modules FR-008): what a module of models applies to, so that the models can be grouped for a reader and for an agent. A subject is data: an id, a title, a sentence on what its models apply to and a place in the order. A module names its subject (subject of defineModule), and a module that names none takes the subject the library gives its name here, where it has one.

subjectOf("identityPki")?.title; // "Identity and access"

Source: commons/data/governance/subjects.ts

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

SUBJECTSconstno test imports it
const SUBJECTS: readonly Subject[]

The subjects of this library's own models.

Subjectinterfaceno test imports it
interface Subject

What a module of models applies to.

MemberTypeWhat it is
idstringIts id: lower-case words joined by hyphens.
titlestringIts title, as a reader sees it.
aboutstringWhat the models of the subject apply to, in a sentence.
ordernumberIts place among the subjects: lower first.
subjectconstno test imports it
const subject: (id: string) => Subject | undefined

A subject by its id, or none.

subjectOfconstno test imports it
const subjectOf: (moduleName: string, named?: string | undefined) => Subject | undefined

The subject of a module, by the id it names or else by its name: none where it has neither.

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