versions.citationOffunctionno test imports itfunction citationOf(r: Release, releasedOn: string): string | undefinedThe text of CITATION.cff for a record released on a day (the day of the release's commit), or why a work has none.
The citation file of a work (commons 0026-works-versioning FR-024, FR-029): CITATION.cff in the Citation File Format 1.2.0, made deterministically from the work's record and the day of the release's commit. A DOI or an ISBN is written only where the record carries an identifier; no tool of the specification mints, requires or registers one.
Pure. Strings are written as JSON strings, which are valid YAML double-quoted scalars, so no value needs another quoting rule. The authors are written by name, as the record holds them. The file lists the same fields in the same order every time, so versions cite --check compares text.
import { citationOf } from "./cite.ts";
// citationOf(release, "2026-11-17") -> "cff-version: 1.2.0\nmessage: ..."versions.citationOffunctionno test imports itfunction citationOf(r: Release, releasedOn: string): string | undefinedThe text of CITATION.cff for a record released on a day (the day of the release's commit), or why a work has none.
versions.CITATION_MESSAGEconstno test imports itconst CITATION_MESSAGE: "If you use this work, please cite it as below."The message every citation file carries.
versions.identifierOffunctionno test imports itfunction identifierOf(identifier: string): { readonly type: "doi" | "other"; readonly value: string; }The kind and value of an identifier: a DOI (bare, from doi: or a doi.org URL) or another identifier such as an ISBN, as written.
citationOffunctionfunction citationOf(r: Release, releasedOn: string): string | undefinedThe text of CITATION.cff for a record released on a day (the day of the release's commit), or why a work has none.
CITATION_MESSAGEconstno test imports itconst CITATION_MESSAGE: "If you use this work, please cite it as below."The message every citation file carries.
identifierOffunctionno test imports itfunction identifierOf(identifier: string): { readonly type: "doi" | "other"; readonly value: string; }The kind and value of an identifier: a DOI (bare, from doi: or a doi.org URL) or another identifier such as an ISBN, as written.