@multiformats/multiaddr
Advanced tools
Comparing version 10.3.3 to 10.3.4
@@ -42,3 +42,3 @@ import type { Protocol } from './protocols-table.js'; | ||
export declare function fromBytes(buf: Uint8Array): Uint8Array; | ||
export declare function validateBytes(buf: Uint8Array): unknown; | ||
export declare function validateBytes(buf: Uint8Array): Error | undefined; | ||
export declare function isValidBytes(buf: Uint8Array): boolean; | ||
@@ -45,0 +45,0 @@ export declare function cleanPath(str: string): string; |
{ | ||
"name": "@multiformats/multiaddr", | ||
"version": "10.3.3", | ||
"version": "10.3.4", | ||
"description": "multiaddr implementation (binary + string representation of network addresses)", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT", |
@@ -195,6 +195,6 @@ import { convertToBytes, convertToString } from './convert.js' | ||
export function validateBytes (buf: Uint8Array) { | ||
export function validateBytes (buf: Uint8Array): Error | undefined { | ||
try { | ||
bytesToTuples(buf) // try to parse. will throw if breaks | ||
} catch (err) { | ||
} catch (err: any) { | ||
return err | ||
@@ -201,0 +201,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
133353
3