IF Commons GitHub

logical/canonical

Written to: 1 requirement: 0 proved, 0 partly, 0 failing, 1 with no test recorded. 0002-planning-core FR-006

The canonical text of a value: its properties sorted by name, recursively, and its arrays in their order (the order of RFC 8785 section 3.2.3 for the keys), with a property whose value is undefined left out. Two events with one id are one event where their canonical texts are the same, and a conflict where they are not (0037-planning FR-017).

import { canonical } from "./canonical.ts";
canonical({ b: 1, a: [2, { d: 4, c: 3 }] }); // '{"a":[2,{"c":3,"d":4}],"b":1}'

Source: commons/planning/src/logical/canonical.ts

0 of 2 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.canonicalfunctionno test imports it
function canonical(value: unknown): string

A text of a value that does not depend on the order its properties were made in.

canonicalfunctionno test imports it
function canonical(value: unknown): string

A text of a value that does not depend on the order its properties were made in.

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