UNPKG

@hypothesis/frontend-shared

Version:

Shared components, styles and utilities for Hypothesis projects

9 lines (8 loc) 376 B
import type { Order } from '../types'; /** * Orders a list of rows based on provided order options. * Provided rows are not mutated, but a copy is returned instead. * Strings are compared using `Intl.Collator`, other types are compared using * standard JavaScript comparisons. */ export declare function useOrderedRows<Row>(rows: Row[], order?: Order<keyof Row>): Row[];