@libp2p/peer-id
Advanced tools
Comparing version 1.1.14 to 1.1.15
@@ -99,3 +99,2 @@ import { CID } from 'multiformats/cid'; | ||
export function peerIdFromPeerId(other) { | ||
const err = errcode(new Error('Not a PeerId'), 'ERR_INVALID_PARAMETERS'); | ||
if (other.type === 'RSA') { | ||
@@ -110,3 +109,3 @@ return new RSAPeerIdImpl(other); | ||
} | ||
throw err; | ||
throw errcode(new Error('Not a PeerId'), 'ERR_INVALID_PARAMETERS'); | ||
} | ||
@@ -113,0 +112,0 @@ export function peerIdFromString(str, decoder) { |
{ | ||
"name": "@libp2p/peer-id", | ||
"version": "1.1.14", | ||
"version": "1.1.15", | ||
"description": "Implementation of @libp2p/interface-peer-d", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT", |
@@ -154,4 +154,2 @@ import { CID } from 'multiformats/cid' | ||
export function peerIdFromPeerId (other: any): PeerId { | ||
const err = errcode(new Error('Not a PeerId'), 'ERR_INVALID_PARAMETERS') | ||
if (other.type === 'RSA') { | ||
@@ -169,3 +167,3 @@ return new RSAPeerIdImpl(other) | ||
throw err | ||
throw errcode(new Error('Not a PeerId'), 'ERR_INVALID_PARAMETERS') | ||
} | ||
@@ -172,0 +170,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66
27060
418