Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

multiaddr-to-uri

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiaddr-to-uri - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

6

index.js

@@ -6,3 +6,7 @@ const Multiaddr = require('multiaddr')

ip4: reduceValue,
ip6: reduceValue,
ip6: (str, content, i, parts) => (
parts.length === 1 && parts[0].protocol === 'ip6'
? content
: `[${content}]`
),
tcp: (str, content, i, parts) => (

@@ -9,0 +13,0 @@ parts.some(p => ['http', 'https', 'ws', 'wss'].includes(p.protocol))

10

package.json
{
"name": "multiaddr-to-uri",
"version": "4.0.0",
"version": "4.0.1",
"description": "Convert a Multiaddr to a URI /dnsaddr/ipfs.io/http -> http://ipfs.io",

@@ -19,8 +19,8 @@ "main": "index.js",

"devDependencies": {
"ava": "^0.25.0",
"nyc": "^12.0.2",
"standard": "^11.0.1"
"ava": "^1.1.0",
"nyc": "^13.1.0",
"standard": "^12.0.1"
},
"dependencies": {
"multiaddr": "^5.0.0"
"multiaddr": "^6.0.3"
},

@@ -27,0 +27,0 @@ "repository": {

@@ -9,7 +9,9 @@ const test = require('ava')

['/ip6/fc00::', 'fc00::'],
['/ip6/fc00::/http', 'http://fc00::'],
['/ip6/fc00::/http', 'http://[fc00::]'],
['/ip4/0.0.7.6/tcp/1234', 'tcp://0.0.7.6:1234'],
['/ip6/::/tcp/0', 'tcp://:::0'],
['/ip4/0.0.7.6/tcp/1234/http', 'http://0.0.7.6:1234'],
['/ip4/0.0.7.6/tcp/1234/https', 'https://0.0.7.6:1234'],
['/ip6/::/tcp/0', 'tcp://[::]:0'],
['/ip4/0.0.7.6/udp/1234', 'udp://0.0.7.6:1234'],
['/ip6/::/udp/0', 'udp://:::0'],
['/ip6/::/udp/0', 'udp://[::]:0'],
['/dnsaddr/ipfs.io', 'ipfs.io'],

@@ -22,2 +24,4 @@ ['/dns4/ipfs.io', 'ipfs.io'],

['/dnsaddr/protocol.ai/tcp/80', 'tcp://protocol.ai:80'],
['/dnsaddr/protocol.ai/tcp/80/http', 'http://protocol.ai:80'],
['/dnsaddr/protocol.ai/tcp/80/https', 'https://protocol.ai:80'],
['/dnsaddr/ipfs.io/ws', 'ws://ipfs.io'],

@@ -27,6 +31,6 @@ ['/dnsaddr/ipfs.io/http', 'http://ipfs.io'],

['/ip4/1.2.3.4/tcp/3456/ws', 'ws://1.2.3.4:3456'],
['/ip6/::/tcp/0/ws', 'ws://:::0'],
['/ip6/::/tcp/0/ws', 'ws://[::]:0'],
['/dnsaddr/ipfs.io/wss', 'wss://ipfs.io'],
['/ip4/1.2.3.4/tcp/3456/wss', 'wss://1.2.3.4:3456'],
['/ip6/::/tcp/0/wss', 'wss://:::0'],
['/ip6/::/tcp/0/wss', 'wss://[::]:0'],
[

@@ -46,3 +50,3 @@ '/ip4/1.2.3.4/tcp/3456/ws/p2p-webrtc-star/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo',

'/ip6/::/tcp/0/ws/p2p-webrtc-star/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo5',
'ws://:::0/p2p-webrtc-star/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo5'
'ws://[::]:0/p2p-webrtc-star/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo5'
],

@@ -54,5 +58,5 @@ [

['/ip4/1.2.3.4/tcp/3456/http/p2p-webrtc-direct', 'http://1.2.3.4:3456/p2p-webrtc-direct'],
['/ip6/::/tcp/0/http/p2p-webrtc-direct', 'http://:::0/p2p-webrtc-direct'],
['/ip6/::/tcp/0/http/p2p-webrtc-direct', 'http://[::]:0/p2p-webrtc-direct'],
['/ip4/1.2.3.4/tcp/3456/ws/p2p-websocket-star', 'ws://1.2.3.4:3456/p2p-websocket-star'],
['/ip6/::/tcp/0/ws/p2p-websocket-star', 'ws://:::0/p2p-websocket-star'],
['/ip6/::/tcp/0/ws/p2p-websocket-star', 'ws://[::]:0/p2p-websocket-star'],
[

@@ -59,0 +63,0 @@ '/dnsaddr/localhost/ws/p2p-websocket-star/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc