Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libp2p/interface

Package Overview
Dependencies
Maintainers
6
Versions
544
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/interface - npm Package Compare versions

Comparing version 0.1.4-69581367 to 0.1.4-50442d7a

dist/src/events.browser.d.ts

3

dist/src/events.d.ts

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

/// <reference types="node" />
import { setMaxListeners as nodeSetMaxListeners } from 'events';
export interface EventCallback<EventType> {

@@ -40,2 +42,3 @@ (evt: EventType): void;

export { TypedEventEmitter as EventEmitter };
export declare const setMaxListeners: typeof nodeSetMaxListeners;
//# sourceMappingURL=events.d.ts.map

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

import { setMaxListeners as nodeSetMaxListeners } from 'events';
/**

@@ -68,2 +69,11 @@ * An implementation of a typed event target

export { TypedEventEmitter as EventEmitter };
// create a setMaxListeners that doesn't break browser usage
export const setMaxListeners = (n, ...eventTargets) => {
try {
nodeSetMaxListeners(n, ...eventTargets);
}
catch {
// swallow error, gulp
}
};
//# sourceMappingURL=events.js.map

5

package.json
{
"name": "@libp2p/interface",
"version": "0.1.4-69581367",
"version": "0.1.4-50442d7a",
"description": "The interface implemented by a libp2p node",

@@ -42,2 +42,5 @@ "license": "Apache-2.0 OR MIT",

],
"browser": {
"events": "./dist/src/events.browser.js"
},
"exports": {

@@ -44,0 +47,0 @@ ".": {

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

import { setMaxListeners as nodeSetMaxListeners } from 'events'
export interface EventCallback<EventType> { (evt: EventType): void }

@@ -120,1 +122,10 @@ export interface EventObject<EventType> { handleEvent: EventCallback<EventType> }

export { TypedEventEmitter as EventEmitter }
// create a setMaxListeners that doesn't break browser usage
export const setMaxListeners: typeof nodeSetMaxListeners = (n, ...eventTargets) => {
try {
nodeSetMaxListeners(n, ...eventTargets)
} catch {
// swallow error, gulp
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc