Skip to content

Commit

Permalink
replace nodejs Buffer API with cross platform Uint8Array
Browse files Browse the repository at this point in the history
  • Loading branch information
Granitosaurus committed Sep 17, 2024
1 parent 2039cf4 commit b5dd654
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class ScrapflyClient {
}

if (format === 'blob') {
content = Buffer.from(await response.arrayBuffer());
content = new Uint8Array(await response.arrayBuffer());
result.format = 'binary';
}

Expand Down Expand Up @@ -306,6 +306,7 @@ export class ScrapflyClient {
}

const content = new Uint8Array(result.image);

// Use Deno's write file method
await writeFile(file_path, content);
}
Expand Down

0 comments on commit b5dd654

Please sign in to comment.