hydrogen-web/scripts/package-overrides/buffer/index.js
Bruno Windels ff09f82f81 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 16:58:35 +02:00

7 lines
236 B
JavaScript

module.exports = class Buffer {
static isBuffer() {return false;}
static from(arrayBuffer) {return arrayBuffer;}
static allocUnsafe(size) {return Buffer.alloc(size);}
static alloc(size) {return new Uint8Array(size);}
};