logical.canonicalizefunctionno test imports itfunction canonicalize(value: unknown): stringJSON's canonical form (RFC 8785); a value that JSON cannot hold (undefined members are dropped, as JSON drops them).
The canonical form of a document and what is made from it: RFC 8785's JSON Canonicalization Scheme (members sorted by the UTF-16 code units of their names, numbers as ECMAScript writes them, no white space), the SHA-256 of it as a document's digest, and the version 5 UUID that gives a derived thing the same id every time.
import { canonicalize } from "./canonical.ts";
canonicalize({ b: 1, a: 2.0 }); // '{"a":2,"b":1}'logical.canonicalizefunctionno test imports itfunction canonicalize(value: unknown): stringJSON's canonical form (RFC 8785); a value that JSON cannot hold (undefined members are dropped, as JSON drops them).
logical.digestOffunctionno test imports itfunction digestOf(value: unknown): Promise<Sha256>The digest of a value: the SHA-256 of its canonical form, the same on every runtime.
logical.grcNamespacefunctionno test imports itfunction grcNamespace(): Promise<Uuid>The namespace of GRC's derived ids: the version 5 UUID of the URL namespace and urn:grc.
logical.idOffunctionno test imports itfunction idOf(parts: readonly string[]): Promise<string>The URN (urn:uuid:...) of a derived id: the same parts give the same id.
logical.uuidOffunctionno test imports itfunction uuidOf(parts: readonly string[]): Promise<string>The bare UUID of a derived id (OSCAL writes it without urn:uuid:).
canonicalizefunctionfunction canonicalize(value: unknown): stringJSON's canonical form (RFC 8785); a value that JSON cannot hold (undefined members are dropped, as JSON drops them).
digestOffunctionfunction digestOf(value: unknown): Promise<Sha256>The digest of a value: the SHA-256 of its canonical form, the same on every runtime.
grcNamespacefunctionno test imports itfunction grcNamespace(): Promise<Uuid>The namespace of GRC's derived ids: the version 5 UUID of the URL namespace and urn:grc.
idOffunctionfunction idOf(parts: readonly string[]): Promise<string>The URN (urn:uuid:...) of a derived id: the same parts give the same id.
uuidOffunctionno test imports itfunction uuidOf(parts: readonly string[]): Promise<string>The bare UUID of a derived id (OSCAL writes it without urn:uuid:).