Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

added transport to options so it can be used to filter by #28

Merged
merged 10 commits into from
Nov 17, 2016
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ build/Release
node_modules

dist
lib
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ js-multiaddr
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](http://github.com/multiformats/multiformats)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![Coverage Status](https://coveralls.io/repos/github/jbenet/js-multiaddr/badge.svg?branch=master)](https://coveralls.io/github/jbenet/js-multiaddr?branch=master)
[![Travis CI](https://travis-ci.org/jbenet/js-multiaddr.svg?branch=master)](https://travis-ci.org/jbenet/js-multiaddr)
[![Circle CI](https://circleci.com/gh/jbenet/js-multiaddr.svg?style=svg)](https://circleci.com/gh/jbenet/js-multiaddr)
[![Dependency Status](https://david-dm.org/jbenet/js-multiaddr.svg?style=flat-square)](https://david-dm.org/jbenet/js-multiaddr) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
[![Coverage Status](https://coveralls.io/repos/github/multiformats/js-multiaddr/badge.svg?branch=master)](https://coveralls.io/github/multiformats/js-multiaddr?branch=master)
[![Travis CI](https://travis-ci.org/multiformats/js-multiaddr.svg?branch=master)](https://travis-ci.org/multiformats/js-multiaddr)
[![Circle CI](https://circleci.com/gh/multiformats/js-multiaddr.svg?style=svg)](https://circleci.com/gh/multiformats/js-multiaddr)
[![Dependency Status](https://david-dm.org/multiformats/js-multiaddr.svg?style=flat-square)](https://david-dm.org/multiformats/js-multiaddr) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)

> JavaScript implementation of [multiaddr](https://github.com/multiformats/multiaddr).

Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "multiaddr",
"version": "2.0.3",
"version": "2.1.0",
"description": "multiaddr implementation (binary + string representation of network addresses)",
"main": "lib/index.js",
"jsnext:main": "src/index.js",
"main": "src/index.js",
"scripts": {
"lint": "aegir-lint",
"test": "aegir-test",
Expand Down Expand Up @@ -36,16 +35,16 @@
},
"homepage": "https://github.com/multiformats/js-multiaddr",
"dependencies": {
"babel-runtime": "^6.11.6",
"babel-runtime": "^6.18.0",
"bs58": "^3.0.0",
"ip": "^1.1.3",
"ip": "^1.1.4",
"lodash.filter": "^4.6.0",
"lodash.map": "^4.6.0",
"varint": "^4.0.1",
"varint": "^5.0.0",
"xtend": "^4.0.1"
},
"devDependencies": {
"aegir": "^8.0.0",
"aegir": "^9.1.2",
"buffer-loader": "0.0.1",
"chai": "^3.5.0",
"pre-commit": "^1.1.3"
Expand All @@ -55,6 +54,7 @@
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Juan Batiz-Benet <juan@benet.ai>",
"Richard Littauer <richard.littauer@gmail.com>",
"Stephen Whitmore <stephen.whitmore@gmail.com>"
"Stephen Whitmore <stephen.whitmore@gmail.com>",
"npm-to-cdn-bot (by Forbes Lindesay) <npmcdn-to-unpkg-bot@users.noreply.github.com>"
]
}
}
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