Skip to content

@dice-roller/rpg-dice-roller / modifiers / sortHandler

Variable: sortHandler ​

const sortHandler: ModifierHandler<SortNode>

Defined in: src/modifiers/handlers/sort.ts:11

s, sa, sd: sorts the items by value, ascending or descending. s defaults to ascending.

The sort is stable, so items with the same value keep their order. On a group, the members are sorted by their totals, and the dice within each pool are sorted too.

MIT Licensed · Credits