Skip to content

Commit 347926a

Browse files
authored
fix(encoding/unstable): encodeBase32 missing default option for format (#6476)
1 parent d78884e commit 347926a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

encoding/unstable_base32.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export type Base32Format = "Base32" | "Base32Hex" | "Base32Crockford";
8989
*/
9090
export function encodeBase32(
9191
input: string | Uint8Array_ | ArrayBuffer,
92-
format: Base32Format,
92+
format: Base32Format = "Base32",
9393
): string {
9494
if (typeof input === "string") {
9595
input = new TextEncoder().encode(input) as Uint8Array_;
@@ -148,7 +148,7 @@ export function encodeRawBase32(
148148
buffer: Uint8Array_,
149149
i: number,
150150
o: number,
151-
format: Base32Format,
151+
format: Base32Format = "Base32",
152152
): number {
153153
const max = calcMax(buffer.length - i);
154154
if (max > buffer.length - o) throw new RangeError("Buffer too small");

0 commit comments

Comments
 (0)