Add support for ArrayBuffer input (#3548)

This commit is contained in:
Jérémy Lal
2023-02-05 10:45:17 +01:00
committed by GitHub
parent 4798d9da64
commit 9608f219bd
6 changed files with 37 additions and 2 deletions

View File

@@ -11,6 +11,9 @@ describe('Raw pixel data', function () {
assert.throws(function () {
sharp(Buffer.from(''));
}, /empty/);
assert.throws(function () {
sharp(new ArrayBuffer(0));
}, /empty/);
assert.throws(function () {
sharp(new Uint8Array(0));
}, /empty/);