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

7 lines
261 B
JavaScript
Raw Normal View History

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);}
};