make ie11 compatible

This commit is contained in:
Bruno Windels 2021-11-10 19:10:06 +01:00
parent 36a982f7e2
commit e83781b26a

View file

@ -1,6 +1,7 @@
export default class Buffer {
static isBuffer(array) {return array instanceof Uint8Array;}
static from(arrayBuffer) {return arrayBuffer;}
static allocUnsafe(size) {return Buffer.alloc(size);}
static alloc(size) {return new Uint8Array(size);}
var Buffer = {
isBuffer: function(array) {return array instanceof Uint8Array;},
from: function(arrayBuffer) {return arrayBuffer;},
allocUnsafe: function(size) {return Buffer.alloc(size);},
alloc: function(size) {return new Uint8Array(size);}
};
export default Buffer;