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

8 lines
284 B
JavaScript
Raw Normal View History

2021-11-10 23:40:06 +05:30
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 23:40:06 +05:30
export default Buffer;