@libp2p/interface-peer-discovery
Advanced tools
Comparing version 1.1.1 to 2.0.0-1c6702c8
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.Libp2PInterfacePeerDiscovery = factory()}(typeof self !== 'undefined' ? self : this, function () { | ||
"use strict";var Libp2PInterfacePeerDiscovery=(()=>{var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var t=(e,o)=>{for(var p in o)i(e,p,{get:o[p],enumerable:!0})},b=(e,o,p,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of n(o))!y.call(e,r)&&r!==p&&i(e,r,{get:()=>o[r],enumerable:!(l=c(o,r))||l.enumerable});return e};var v=e=>b(i({},"__esModule",{value:!0}),e);var u={};t(u,{isPeerDiscovery:()=>m,peerDiscovery:()=>f,symbol:()=>s});var f=Symbol.for("@libp2p/peer-discovery"),s=Symbol.for("@libp2p/peer-discovery");function m(e){return e!=null&&!!e[s]}return v(u);})(); | ||
"use strict";var Libp2PInterfacePeerDiscovery=(()=>{var c=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var l=(o,e)=>{for(var p in e)c(o,p,{get:e[p],enumerable:!0})},t=(o,e,p,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of y(e))!b.call(o,r)&&r!==p&&c(o,r,{get:()=>e[r],enumerable:!(i=s(e,r))||i.enumerable});return o};var v=o=>t(c({},"__esModule",{value:!0}),o);var f={};l(f,{peerDiscovery:()=>d});var d=Symbol.for("@libp2p/peer-discovery");return v(f);})(); | ||
return Libp2PInterfacePeerDiscovery})); |
@@ -23,3 +23,2 @@ import type { PeerInfo } from '@libp2p/interface-peer-info'; | ||
export declare const peerDiscovery: unique symbol; | ||
export declare const symbol: unique symbol; | ||
export interface PeerDiscoveryEvents { | ||
@@ -29,12 +28,3 @@ 'peer': CustomEvent<PeerInfo>; | ||
export interface PeerDiscovery extends EventEmitter<PeerDiscoveryEvents> { | ||
/** | ||
* Used to identify the peer discovery mechanism | ||
*/ | ||
[Symbol.toStringTag]: string; | ||
/** | ||
* Used by the isPeerDiscovery function | ||
*/ | ||
[symbol]: true; | ||
} | ||
export declare function isPeerDiscovery(other: any): other is PeerDiscovery; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -21,6 +21,2 @@ /** | ||
export const peerDiscovery = Symbol.for('@libp2p/peer-discovery'); | ||
export const symbol = Symbol.for('@libp2p/peer-discovery'); | ||
export function isPeerDiscovery(other) { | ||
return other != null && Boolean(other[symbol]); | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@libp2p/interface-peer-discovery", | ||
"version": "1.1.1", | ||
"version": "2.0.0-1c6702c8", | ||
"description": "Peer Discovery interface for libp2p", | ||
"license": "Apache-2.0 OR MIT", | ||
"homepage": "https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-peer-discovery#readme", | ||
"homepage": "https://github.com/libp2p/js-libp2p/tree/master/packages/interface-peer-discovery#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/libp2p/js-libp2p-interfaces.git" | ||
"url": "git+https://github.com/libp2p/js-libp2p.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/libp2p/js-libp2p-interfaces/issues" | ||
"url": "https://github.com/libp2p/js-libp2p/issues" | ||
}, | ||
@@ -18,6 +18,2 @@ "keywords": [ | ||
], | ||
"engines": { | ||
"node": ">=16.0.0", | ||
"npm": ">=7.0.0" | ||
}, | ||
"type": "module", | ||
@@ -136,4 +132,4 @@ "types": "./dist/src/index.d.ts", | ||
"dependencies": { | ||
"@libp2p/interface-peer-info": "^1.0.0", | ||
"@libp2p/interfaces": "^3.0.0" | ||
"@libp2p/interface-peer-info": "1.0.10-1c6702c8", | ||
"@libp2p/interfaces": "3.3.2-1c6702c8" | ||
}, | ||
@@ -140,0 +136,0 @@ "devDependencies": { |
@@ -5,4 +5,4 @@ # @libp2p/interface-peer-discovery <!-- omit in toc --> | ||
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io) | ||
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-interfaces.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-interfaces) | ||
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-interfaces/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-interfaces/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) | ||
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p) | ||
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster) | ||
@@ -108,3 +108,3 @@ > Peer Discovery interface for libp2p | ||
- <https://libp2p.github.io/js-libp2p-interfaces/modules/_libp2p_interface_peer_discovery.html> | ||
- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_peer_discovery.html> | ||
@@ -111,0 +111,0 @@ ## License |
@@ -25,4 +25,2 @@ import type { PeerInfo } from '@libp2p/interface-peer-info' | ||
export const symbol = Symbol.for('@libp2p/peer-discovery') | ||
export interface PeerDiscoveryEvents { | ||
@@ -32,16 +30,2 @@ 'peer': CustomEvent<PeerInfo> | ||
export interface PeerDiscovery extends EventEmitter<PeerDiscoveryEvents> { | ||
/** | ||
* Used to identify the peer discovery mechanism | ||
*/ | ||
[Symbol.toStringTag]: string | ||
/** | ||
* Used by the isPeerDiscovery function | ||
*/ | ||
[symbol]: true | ||
} | ||
export function isPeerDiscovery (other: any): other is PeerDiscovery { | ||
return other != null && Boolean(other[symbol]) | ||
} | ||
export interface PeerDiscovery extends EventEmitter<PeerDiscoveryEvents> {} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
11295
9
78
2
+ Added@libp2p/interface-peer-id@2.0.2-1c6702c8(transitive)
+ Added@libp2p/interface-peer-info@1.0.10-1c6702c8(transitive)
+ Added@libp2p/interfaces@3.3.2-1c6702c8(transitive)
- Removed@libp2p/interface-peer-id@2.0.2(transitive)
- Removed@libp2p/interface-peer-info@1.0.10(transitive)
- Removed@libp2p/interfaces@3.3.2(transitive)