Skip to main content
Version: v0.0.6

Function: makeCorpus()

makeCorpus(seed, artifacts, quirks?): Corpus

Assemble a deep-frozen Corpus from a seed and its artifacts, deriving the manifest.

Parameters

seed

number

The seed the artifacts were generated from.

artifacts

readonly Artifact[]

The generated artifacts, in order.

quirks?

readonly string[] = []

The quirk names applied (default none).

Returns

Corpus

A deep-frozen, self-describing Corpus.

Example

import { makeCorpus } from "@cosyte/synth";
const corpus = makeCorpus(1, [{ format: "hl7v2", kind: "ADT^A01", content, warnings: [] }]);
corpus.manifest.counts["ADT^A01"]; // 1