We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d78884e commit 347926aCopy full SHA for 347926a
encoding/unstable_base32.ts
@@ -89,7 +89,7 @@ export type Base32Format = "Base32" | "Base32Hex" | "Base32Crockford";
89
*/
90
export function encodeBase32(
91
input: string | Uint8Array_ | ArrayBuffer,
92
- format: Base32Format,
+ format: Base32Format = "Base32",
93
): string {
94
if (typeof input === "string") {
95
input = new TextEncoder().encode(input) as Uint8Array_;
@@ -148,7 +148,7 @@ export function encodeRawBase32(
148
buffer: Uint8Array_,
149
i: number,
150
o: number,
151
152
): number {
153
const max = calcMax(buffer.length - i);
154
if (max > buffer.length - o) throw new RangeError("Buffer too small");
0 commit comments