IF Commons GitHub

versions/cite

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: ..."

Source: commons/mizan/src/versions/cite.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.

versions.citationOffunctionno test imports it
function citationOf(r: Release, releasedOn: string): string | undefined

The 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 it
const CITATION_MESSAGE: "If you use this work, please cite it as below."

The message every citation file carries.

versions.identifierOffunctionno test imports it
function 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.

citationOffunction
function citationOf(r: Release, releasedOn: string): string | undefined

The text of CITATION.cff for a record released on a day (the day of the release's commit), or why a work has none.

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

CITATION_MESSAGEconstno test imports it
const CITATION_MESSAGE: "If you use this work, please cite it as below."

The message every citation file carries.

identifierOffunctionno test imports it
function 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.

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