• Sorts and paginates the given ResultItems.

    First the given items are sorted by the rules specified in "options.sort". Afterwards a section of the sorted result is created and returned. The returned section starts at index "options.start" and has got a maximum length of "options.count".

    Type Parameters

    • T extends Readonly<Record<string, any>>

    Parameters

    • items: ResultItems<T>

      Result of a query.

    • Optional options: SortOptions & PaginationOptions

      Options with sort/start/count flags.

      • If "options.sort" is not specified, the given query result is not sorted.
      • If "options.start" is not specified, the returned result section starts at index 0 of the sorted result.
      • If "options.count" is not specified, the returned section ends with the last element of the sorted result.

    Returns ResultItems<T>

    Sorted section of the given result.

Generated using TypeDoc