@multiformats/multiaddr
Advanced tools
Comparing version 10.4.1 to 10.4.2
@@ -101,5 +101,8 @@ import * as ip from './ip.js'; | ||
const ipString = ip.toString(ipBuff, 0, ipBuff.length); | ||
if (ipString == null || !ip.isIP(ipString)) { | ||
throw new Error('invalid ip address'); | ||
if (ipString == null) { | ||
throw new Error('ipBuff is required'); | ||
} | ||
if (!ip.isIP(ipString)) { | ||
throw new Error(`invalid ip address "${ipString}"`); | ||
} | ||
return ipString; | ||
@@ -106,0 +109,0 @@ } |
{ | ||
"name": "@multiformats/multiaddr", | ||
"version": "10.4.1", | ||
"version": "10.4.2", | ||
"description": "multiaddr implementation (binary + string representation of network addresses)", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT", |
@@ -113,5 +113,8 @@ | ||
const ipString = ip.toString(ipBuff, 0, ipBuff.length) | ||
if (ipString == null || !ip.isIP(ipString)) { | ||
throw new Error('invalid ip address') | ||
if (ipString == null) { | ||
throw new Error('ipBuff is required') | ||
} | ||
if (!ip.isIP(ipString)) { | ||
throw new Error(`invalid ip address "${ipString}"`) | ||
} | ||
return ipString | ||
@@ -118,0 +121,0 @@ } |
Sorry, the diff of this file is not supported yet
133034
2710