This repository has been archived on 2022-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
hydrogen-web/scripts/package-overrides/buffer/index.js
Bruno Windels 3b72157e64 apparently, package-overrides should use esm
otherwise they don't get transpiled for some reason
2021-11-08 11:12:19 +01:00

6 lines
261 B
JavaScript

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