API Reference / @evolu/common / Order / orderBigInt
Variable: orderBigInt
const orderBigInt: Order<bigint>;
Defined in: packages/common/src/Order.ts:101
An order for bigints in ascending order.
Example
orderBigInt(1n, 2n); // -1
orderBigInt(2n, 1n); // 1
orderBigInt(1n, 1n); // 0
[2n, 1n, 3n].toSorted(orderBigInt); // [1n, 2n, 3n]