IF Commons GitHub

logical/convert

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-soc2-package FR-001, 0002-soc2-package FR-004

The conversion of the criteria into the controls of the framework (0002-soc2-package FR-001, FR-004): a pure function of the criteria. Each control keeps the identifier of its criterion, its title and its statement, and names its series (CC6) as its family. A criterion that repeats an identifier is an error of the source, and the conversion says so rather than choose.

import { convert } from "./convert.ts";
convert([{ id: "CC1.1", title: "t", statement: "s", family: "CC1" }]).controls.length; // 1

Source: commons/catalog-soc2/src/logical/convert.ts

1 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.OutControltypeno test imports it
type OutControl = { readonly id: string; readonly title: string; readonly statement: string; readonly family: string };

A control of the framework document.

logical.Convertedtypeno test imports it
type Converted = { readonly controls: readonly OutControl[]; readonly repeated: readonly string[] };

The controls, or the identifiers that the source repeats.

logical.convertfunctionno test imports it
function convert(criteria: readonly Criterion[]): Converted

The controls of the criteria, in the order given.

OutControltypeno test imports it
type OutControl = { readonly id: string; readonly title: string; readonly statement: string; readonly family: string };

A control of the framework document.

Convertedtypeno test imports it
type Converted = { readonly controls: readonly OutControl[]; readonly repeated: readonly string[] };

The controls, or the identifiers that the source repeats.

convertfunction
function convert(criteria: readonly Criterion[]): Converted

The controls of the criteria, in the order given.

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

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