Skip to main content

Function: comparatorFor()

comparatorFor<Row>(col, rows): Comparator

Defined in: packages/sdvtables/src/engine.ts:187

Beta

The comparator applySort uses for col: its own compare, else numeric for a numeric kind or numeric samples, by time for Date samples, else en-locale text. Engine plumbing for custom renderers: it may change before 1.0.

Type Parameters​

Row​

Row

Parameters​

col​

ColumnSpec<Row>

rows​

readonly Row[]

Returns​

Comparator