@multiformats/multiaddr
Advanced tools
Comparing version 10.1.2 to 10.1.3
@@ -74,8 +74,3 @@ import { getProtocol } from './protocols-table.js'; | ||
*/ | ||
toOptions(): { | ||
family: number; | ||
host: string; | ||
transport: string; | ||
port: number; | ||
}; | ||
toOptions(): MultiaddrObject; | ||
/** | ||
@@ -82,0 +77,0 @@ * Returns the protocols the Multiaddr is defined with, as an array of objects, in |
{ | ||
"name": "@multiformats/multiaddr", | ||
"version": "10.1.2", | ||
"version": "10.1.3", | ||
"description": "multiaddr implementation (binary + string representation of network addresses)", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -119,6 +119,6 @@ import * as codec from './codec.js' | ||
*/ | ||
toOptions () { | ||
toOptions (): MultiaddrObject { | ||
const parsed = this.toString().split('/') | ||
const opts = { | ||
const opts: MultiaddrObject = { | ||
family: parsed[1] === 'ip4' ? 4 : 6, | ||
@@ -125,0 +125,0 @@ host: parsed[2], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
128490
2615