entriesIn

tcmts.share.entriesIn · #uknacruf · term · runs anywhere

How many history entries lead to an entry, it too (its ancestors).

import type { Share } from "#codebase/tcmts/share";

export const entriesIn = (s: Pick<Share, "cb" | "cache">, causal: string): number =>
  s.cache.atHead(s.cb, `entries ${causal}`, () => s.cb.store.ancestors(causal).length)

uses

used by