textHash
uses tcmts.store.hash32, which uses node:crypto
A text version's hash: its text and its doc (where the doc names definitions follows from those, and the names).
import { hash32 } from "#codebase/tcmts/store"; import type { TextVersion } from "#codebase/tcmts/store"; export const textHash = (v: TextVersion) => hash32("tcm-text-v1", JSON.stringify([v.sourceText, v.doc ?? null]))