Skip to content

Commit 3c6dfdf

Browse files
committed
Simplify orderUint8Array docs
1 parent cb2a471 commit 3c6dfdf

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

packages/common/src/Order.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,7 @@ export const orderNumber = createOrder<number>((a, b) => a < b);
9494
*/
9595
export const orderBigInt = createOrder<bigint>((a, b) => a < b);
9696

97-
/**
98-
* An {@link Order} for {@link Uint8Array} values.
99-
*
100-
* Comparison is performed in two phases:
101-
*
102-
* 1. Compare `byteLength` (shorter arrays are considered smaller).
103-
* 2. If lengths are equal, compare bytes lexicographically (ascending).
104-
*
105-
* ### Example
106-
*
107-
* ```ts
108-
* orderUint8Array(new Uint8Array([1, 2]), new Uint8Array([1, 2, 3])); // -1
109-
* orderUint8Array(new Uint8Array([1, 2, 3]), new Uint8Array([1, 2])); // 1
110-
* orderUint8Array(new Uint8Array([1, 2]), new Uint8Array([1, 3])); // -1
111-
* ```
112-
*/
97+
/** An {@link Order} for Uint8Array. */
11398
export const orderUint8Array: Order<Uint8Array> = (a, b) => {
11499
if (a.byteLength > b.byteLength) return 1;
115100
if (a.byteLength < b.byteLength) return -1;

0 commit comments

Comments
 (0)