Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit 93ef7c3

Browse files
vasco-santosjacobheun
authored andcommittedJan 24, 2019
fix: ipv6 naming with multiaddr-to-uri package (#81)
* chore: use multiaddr-to-uri package * fix: ipv6 naming with multiaddr-to-uri
1 parent 24541d3 commit 93ef7c3

File tree

4 files changed

+222
-181
lines changed

4 files changed

+222
-181
lines changed
 

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"debug": "^4.1.1",
4545
"interface-connection": "~0.3.2",
4646
"mafmt": "^6.0.4",
47+
"multiaddr-to-uri": "^4.0.1",
4748
"pull-ws": "hugomrdias/pull-ws#fix/bundle-size"
4849
},
4950
"devDependencies": {

‎src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const mafmt = require('mafmt')
55
const withIs = require('class-is')
66
const Connection = require('interface-connection').Connection
77

8-
const maToUrl = require('./ma-to-url')
8+
const toUri = require('multiaddr-to-uri')
99
const debug = require('debug')
1010
const log = debug('libp2p:websockets:dialer')
1111

@@ -18,9 +18,9 @@ class WebSockets {
1818
options = {}
1919
}
2020

21-
callback = callback || function () {}
21+
callback = callback || function () { }
2222

23-
const url = maToUrl(ma)
23+
const url = toUri(ma)
2424
log('dialing %s', url)
2525
const socket = connect(url, {
2626
binary: true,

‎src/ma-to-url.js

-37
This file was deleted.

0 commit comments

Comments
 (0)