API reference › @evolu/common › local‑first/Timestamp › orderTimestamp
const orderTimestamp: Order<Timestamp>;
Defined in: packages/common/src/local-first/Timestamp.ts:479
Orders Timestamp by milliseconds, counter, then node ID.
Matches orderTimestampBytes without encoding timestamps. Distinct objects with identical fields compare as equal.
Example
import { assertEqual } from "@evolu/common";
import { createTimestamp, orderTimestamp } from "@evolu/common/local-first";
const timestamp = createTimestamp();
assertEqual(orderTimestamp(timestamp, { ...timestamp }), 0);