diff --git a/.gitignore b/.gitignore index 5b1fd197..907c78a7 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,3 @@ build/Release node_modules dist -lib \ No newline at end of file diff --git a/README.md b/README.md index 7994a34b..c9989cce 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/package.json b/package.json index d84ae670..2a857936 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" @@ -55,6 +54,7 @@ "Friedel Ziegelmayer ", "Juan Batiz-Benet ", "Richard Littauer ", - "Stephen Whitmore " + "Stephen Whitmore ", + "npm-to-cdn-bot (by Forbes Lindesay) " ] -} +} \ No newline at end of file diff --git a/src/index.js b/src/index.js index 8c9a91f5..3bf18d81 100644 --- a/src/index.js +++ b/src/index.js @@ -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 } diff --git a/test/index.spec.js b/test/index.spec.js index e8928a9a..7b233944 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -302,6 +302,7 @@ describe('helpers', () => { ).to.be.eql({ family: 'ipv4', host: '0.0.0.0', + transport: 'tcp', port: '1234' }) })