🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@libp2p/utils

Package Overview
Dependencies
Maintainers
4
Versions
736
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/utils - npm Package Compare versions

Comparing version

to
1.0.5

2

dist/src/multiaddr/is-loopback.d.ts

@@ -5,3 +5,3 @@ import type { Multiaddr } from '@multiformats/multiaddr';

*/
export declare function isLoopback(ma: Multiaddr): any;
export declare function isLoopback(ma: Multiaddr): boolean;
//# sourceMappingURL=is-loopback.d.ts.map

@@ -1,3 +0,2 @@

// @ts-expect-error is-loopback-addr does not publish types
import isLoopbackAddr from 'is-loopback-addr';
import { isLoopbackAddr } from 'is-loopback-addr';
/**

@@ -4,0 +3,0 @@ * Check if a given multiaddr is a loopback address.

@@ -28,3 +28,3 @@ import type { MuxedStream } from '@libp2p/interfaces/stream-muxer';

interface StreamProperties {
stream: MuxedStream<Uint8Array>;
stream: MuxedStream;
remoteAddr: Multiaddr;

@@ -37,4 +37,4 @@ localAddr: Multiaddr;

*/
export declare function streamToMaConnection(props: StreamProperties, options?: StreamOptions): MultiaddrConnection<Uint8Array>;
export declare function streamToMaConnection(props: StreamProperties, options?: StreamOptions): MultiaddrConnection;
export {};
//# sourceMappingURL=stream-to-ma-conn.d.ts.map

@@ -1,2 +0,2 @@

import { source as abortable } from 'abortable-iterator';
import { abortableSource } from 'abortable-iterator';
import debug from 'debug';

@@ -14,3 +14,3 @@ const log = debug('libp2p:stream:converter');

if (options.signal != null) {
source = abortable(source, options.signal);
source = abortableSource(source, options.signal);
}

@@ -31,3 +31,3 @@ try {

},
source: (options.signal != null) ? abortable(source, options.signal) : source,
source: (options.signal != null) ? abortableSource(source, options.signal) : source,
conn: stream,

@@ -34,0 +34,0 @@ localAddr,

{
"name": "@libp2p/utils",
"version": "1.0.4",
"version": "1.0.5",
"description": "Package to aggregate shared logic and dependencies for the libp2p ecosystem",

@@ -175,14 +175,14 @@ "license": "Apache-2.0 OR MIT",

"@multiformats/multiaddr": "^10.1.1",
"abortable-iterator": "^3.0.0",
"abortable-iterator": "^4.0.2",
"debug": "^4.3.0",
"err-code": "^3.0.1",
"is-loopback-addr": "^1.0.0",
"is-loopback-addr": "^2.0.1",
"private-ip": "^2.1.1"
},
"devDependencies": {
"@libp2p/interfaces": "^0.2.0",
"@libp2p/interfaces": "^1.0.3",
"@types/debug": "^4.1.5",
"aegir": "^36.1.2",
"it-pair": "^1.0.0",
"it-pipe": "^1.1.0",
"it-pair": "^2.0.2",
"it-pipe": "^2.0.2",
"streaming-iterables": "^6.0.0",

@@ -189,0 +189,0 @@ "util": "^0.12.3"

@@ -1,3 +0,2 @@

// @ts-expect-error is-loopback-addr does not publish types
import isLoopbackAddr from 'is-loopback-addr'
import { isLoopbackAddr } from 'is-loopback-addr'
import type { Multiaddr } from '@multiformats/multiaddr'

@@ -4,0 +3,0 @@

@@ -1,2 +0,2 @@

import { source as abortable } from 'abortable-iterator'
import { abortableSource } from 'abortable-iterator'
import debug from 'debug'

@@ -39,3 +39,3 @@ import type { MuxedStream } from '@libp2p/interfaces/stream-muxer'

interface StreamProperties {
stream: MuxedStream<Uint8Array>
stream: MuxedStream
remoteAddr: Multiaddr

@@ -55,3 +55,3 @@ localAddr: Multiaddr

if (options.signal != null) {
source = abortable(source, options.signal)
source = abortableSource(source, options.signal)
}

@@ -72,3 +72,3 @@

},
source: (options.signal != null) ? abortable(source, options.signal) : source,
source: (options.signal != null) ? abortableSource(source, options.signal) : source,
conn: stream,

@@ -75,0 +75,0 @@ localAddr,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet