API View source
compareByHlc()
Compares two events by their HLC values only.
Signature
function compareByHlc(a: HlcTimestamp, b: HlcTimestamp): CausalOrderingUse this when you want a direct HLC-to-HLC comparison without inferring broader causal semantics.
Usage
import { compareByHlc } from "causal-order"
const relation = compareByHlc(eventA.clock, eventB.clock)
console.log(relation) Details
- Use this when you want direct HLC comparison without broader causal inference.
- Possible results are
before,after,equal, andunknownfor invalid input.