docs: function addOrderByToRef(ref, orderBy) {
    if (!isArray(orderBy) && !isString(orderBy)) {
      throw new Error('orderBy parameter must be an array or string.');
    }
    if (isString(orderBy)) {
      return ref.orderBy(orderBy);
    }
    if (isString(orderBy[0])) {
      return ref.orderBy(...orderBy);
    }
    return orderBy.reduce(
      (acc, orderByArgs) => addOrderByToRef(acc, orderByArgs),
      ref,
    );
  }