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 f798a8bca4 add bs58 as a dependency
override some of its imports as they would just add
a lot of nodejs fluff that needs stubbing out for a browser.
2020-09-16 18:31:16 +02:00

6 lines
263 B
JavaScript

module.exports = 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);}
};