Add toArrayBuffer to generate transferable output #4355

This commit is contained in:
Lovell Fuller
2025-12-22 15:05:33 +00:00
parent e1bad5470e
commit 6176f53f83
11 changed files with 142 additions and 7 deletions

View File

@@ -86,6 +86,10 @@ let transformer = sharp()
});
readableStream.pipe(transformer).pipe(writableStream);
sharp().toArrayBuffer();
sharp().toArrayBuffer().then(({ data }) => data);
sharp().toArrayBuffer().then(({ data }) => new Uint8Array(data));
console.log(sharp.format);
console.log(sharp.versions);