From 8065e07bad57b5732cdcec5ce3829ac2361604cf Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Mon, 23 Mar 2020 16:58:28 +0000 Subject: [PATCH] fix: add buffer (#112) --- package.json | 3 ++- src/socket-to-conn.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ab93893..3c491c1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "homepage": "https://github.com/libp2p/js-libp2p-websockets#readme", "dependencies": { "abortable-iterator": "^3.0.0", + "buffer": "^5.5.0", "class-is": "^1.1.0", "debug": "^4.1.1", "err-code": "^2.0.0", @@ -55,9 +56,9 @@ "bl": "^4.0.0", "chai": "^4.2.0", "dirty-chai": "^2.0.1", - "libp2p-interfaces": "^0.2.0", "it-goodbye": "^2.0.1", "it-pipe": "^1.0.1", + "libp2p-interfaces": "^0.2.0", "streaming-iterables": "^4.1.0" }, "contributors": [ diff --git a/src/socket-to-conn.js b/src/socket-to-conn.js index c1408ee..8bcbaa6 100644 --- a/src/socket-to-conn.js +++ b/src/socket-to-conn.js @@ -1,5 +1,6 @@ 'use strict' +const { Buffer } = require('buffer') const abortable = require('abortable-iterator') const { CLOSE_TIMEOUT } = require('./constants') const toMultiaddr = require('libp2p-utils/src/ip-port-to-multiaddr')