@libp2p/interface-peer-routing
Advanced tools
| (function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.Libp2PInterfacePeerRouting = factory()}(typeof self !== 'undefined' ? self : this, function () { | ||
| "use strict";var Libp2PInterfacePeerRouting=(()=>{var t=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(o,e,x,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of b(e))!c.call(o,p)&&p!==x&&t(o,p,{get:()=>e[p],enumerable:!(r=a(e,p))||r.enumerable});return o};var f=o=>d(t({},"__esModule",{value:!0}),o);var g={};return f(g);})(); | ||
| "use strict";var Libp2PInterfacePeerRouting=(()=>{var t=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var l=(e,o)=>{for(var r in o)t(e,r,{get:o[r],enumerable:!0})},u=(e,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of b(o))!g.call(e,p)&&p!==r&&t(e,p,{get:()=>o[p],enumerable:!(i=n(o,p))||i.enumerable});return e};var c=e=>u(t({},"__esModule",{value:!0}),e);var m={};l(m,{peerRouting:()=>f});var f=Symbol.for("@libp2p/peer-routing");return c(m);})(); | ||
| return Libp2PInterfacePeerRouting})); |
+20
-0
| import type { PeerId } from '@libp2p/interface-peer-id'; | ||
| import type { PeerInfo } from '@libp2p/interface-peer-info'; | ||
| import type { AbortOptions } from '@libp2p/interfaces'; | ||
| /** | ||
| * Any object that implements this Symbol as a property should return a | ||
| * PeerRouting instance as the property value, similar to how | ||
| * `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`. | ||
| * | ||
| * @example | ||
| * | ||
| * ```js | ||
| * import { peerRouting, PeerRouting } from '@libp2p/peer-routing' | ||
| * | ||
| * class MyPeerRouter implements PeerRouting { | ||
| * get [peerRouting] () { | ||
| * return this | ||
| * } | ||
| * | ||
| * // ...other methods | ||
| * } | ||
| * ``` | ||
| */ | ||
| export declare const peerRouting: unique symbol; | ||
| export interface PeerRouting { | ||
@@ -5,0 +25,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;OASG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;IAEvE;;;;;;;;;;;;OAYG;IACH,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,aAAa,CAAC,QAAQ,CAAC,CAAA;CACtF"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,eAAqC,CAAA;AAE7D,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;OASG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;IAEvE;;;;;;;;;;;;OAYG;IACH,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,aAAa,CAAC,QAAQ,CAAC,CAAA;CACtF"} |
+20
-1
@@ -1,2 +0,21 @@ | ||
| export {}; | ||
| /** | ||
| * Any object that implements this Symbol as a property should return a | ||
| * PeerRouting instance as the property value, similar to how | ||
| * `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`. | ||
| * | ||
| * @example | ||
| * | ||
| * ```js | ||
| * import { peerRouting, PeerRouting } from '@libp2p/peer-routing' | ||
| * | ||
| * class MyPeerRouter implements PeerRouting { | ||
| * get [peerRouting] () { | ||
| * return this | ||
| * } | ||
| * | ||
| * // ...other methods | ||
| * } | ||
| * ``` | ||
| */ | ||
| export const peerRouting = Symbol.for('@libp2p/peer-routing'); | ||
| //# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAA"} |
| { | ||
| "PeerRouting": "https://libp2p.github.io/js-libp2p-interfaces/interfaces/_libp2p_interface_libp2p._internal_.PeerRouting.html" | ||
| "PeerRouting": "https://libp2p.github.io/js-libp2p-interfaces/interfaces/_libp2p_interface_libp2p._internal_.PeerRouting.html", | ||
| "peerRouting": "https://libp2p.github.io/js-libp2p-interfaces/variables/_libp2p_interface_peer_routing.peerRouting-1.html" | ||
| } |
+1
-1
| { | ||
| "name": "@libp2p/interface-peer-routing", | ||
| "version": "1.0.8", | ||
| "version": "1.1.0", | ||
| "description": "Peer Routing interface for libp2p", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT", |
+21
-0
@@ -5,2 +5,23 @@ import type { PeerId } from '@libp2p/interface-peer-id' | ||
| /** | ||
| * Any object that implements this Symbol as a property should return a | ||
| * PeerRouting instance as the property value, similar to how | ||
| * `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`. | ||
| * | ||
| * @example | ||
| * | ||
| * ```js | ||
| * import { peerRouting, PeerRouting } from '@libp2p/peer-routing' | ||
| * | ||
| * class MyPeerRouter implements PeerRouting { | ||
| * get [peerRouting] () { | ||
| * return this | ||
| * } | ||
| * | ||
| * // ...other methods | ||
| * } | ||
| * ``` | ||
| */ | ||
| export const peerRouting = Symbol.for('@libp2p/peer-routing') | ||
| export interface PeerRouting { | ||
@@ -7,0 +28,0 @@ /** |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
12029
19.22%128
91.04%1
Infinity%