Skip to content

Commit

Permalink
added transport to options so it can be used to filter by (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
SidHarder authored and daviddias committed Nov 17, 2016
1 parent c21f8c7 commit 4d9fc9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Multiaddr.prototype.toOptions = function toOptions () {
var parsed = this.toString().split('/')
opts.family = parsed[1] === 'ip4' ? 'ipv4' : 'ipv6'
opts.host = parsed[2]
opts.transport = parsed[3]
opts.port = parsed[4]
return opts
}
Expand Down
1 change: 1 addition & 0 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ describe('helpers', () => {
).to.be.eql({
family: 'ipv4',
host: '0.0.0.0',
transport: 'tcp',
port: '1234'
})
})
Expand Down

0 comments on commit 4d9fc9c

Please # to comment.