API Reference / @evolu/common / Order / orderString
Variable: orderString
const orderString: Order<string>;
Defined in: packages/common/src/Order.ts:70
An order for string
values in ascending order.
Example
orderString("a", "b"); // -1
orderString("b", "a"); // 1
orderString("a", "a"); // 0
["c", "b", "a"].toSorted(orderString); // ["a", "b", "c"]