vector-im-hydrogen-web/scripts/package-overrides/buffer/index.js

8 lines
284 B
JavaScript
Raw Normal View History

2021-11-10 19:10:06 +01:00
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);}
};
2021-11-10 19:10:06 +01:00
export default Buffer;