mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
fix: polyfill Buffer for browser compatibility (#112)
* Polyfill with "buffer" and "assert" for browser environments * Instead of relying on webpack to make this library browser compatible, we now use a buffer library that provides a polyfill when used in the browser
This commit is contained in:
@@ -6,6 +6,7 @@ const { makeParser, BytesList, BinarySerializer } = binary;
|
||||
const { coreTypes } = require("../dist/types");
|
||||
const { UInt8, UInt16, UInt32, UInt64, STObject } = coreTypes;
|
||||
const bigInt = require("big-integer");
|
||||
const { Buffer } = require("buffer/");
|
||||
|
||||
const { loadFixture } = require("./utils");
|
||||
const fixtures = loadFixture("data-driven-tests.json");
|
||||
|
||||
Reference in New Issue
Block a user