We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f89f449 commit 4b436ccCopy full SHA for 4b436cc
1 file changed
src/lang.ts
@@ -179,8 +179,8 @@ export function selectRandom<T>(array: T[]) {
179
}
180
181
export function streamToBuffer(stream: NodeJS.ReadableStream): Promise<Buffer> {
182
- const chunks: Buffer[] = [];
183
return new Promise<Buffer>((resolve, reject) => {
+ const chunks: Buffer[] = [];
184
stream.on("data", (chunk) => chunks.push(chunk));
185
stream.on("error", (err) => reject(err));
186
stream.on("end", () =>
0 commit comments