@dxos/echo
    Preparing search index...

    Function getPosition

    • The global position a feed item was assigned, or +Infinity when it has none — a block written locally and not yet acknowledged, which sorts last because it is the newest.

      Use this to put items into append order before calling history: a query returns an unordered set, and created is a wall clock that peers do not agree on.

      Parameters

      Returns number

      const inAppendOrder = Array.sort(messages, Order.mapInput(Order.number, Feed.getPosition));
      const { items } = Feed.history(inAppendOrder);

      O(k) in the item foreign-key count.