diff --git a/assets/anchor.js b/assets/anchor.js index f74c2de7..1f573dcb 100644 --- a/assets/anchor.js +++ b/assets/anchor.js @@ -6,7 +6,7 @@ /* eslint-env amd, node */ // https://github.com/umdjs/umd/blob/master/templates/returnExports.js -(function(root, factory) { +(function (root, factory) { 'use strict'; if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. @@ -21,7 +21,7 @@ root.AnchorJS = factory(); root.anchors = new root.AnchorJS(); } -})(this, function() { +})(this, function () { 'use strict'; function AnchorJS(options) { this.options = options || {}; @@ -51,7 +51,7 @@ * https://github.com/Modernizr/Modernizr/blob/da22eb27631fc4957f67607fe6042e85c0a84656/feature-detects/touchevents.js#L40 * @returns {Boolean} - true if the current device supports touch. */ - this.isTouchDevice = function() { + this.isTouchDevice = function () { return !!( 'ontouchstart' in window || (window.DocumentTouch && document instanceof DocumentTouch) @@ -64,7 +64,7 @@ * to. Also accepts an array or nodeList containing the relavant elements. * @returns {this} - The AnchorJS object */ - this.add = function(selector) { + this.add = function (selector) { var elements, elsWithIds, idList, @@ -193,7 +193,7 @@ * OR a nodeList / array containing the DOM elements. * @returns {this} - The AnchorJS object */ - this.remove = function(selector) { + this.remove = function (selector) { var index, domAnchor, elements = _getElements(selector); @@ -216,7 +216,7 @@ /** * Removes all anchorjs links. Mostly used for tests. */ - this.removeAll = function() { + this.removeAll = function () { this.remove(this.elements); }; @@ -229,7 +229,7 @@ * @param {String} text - Any text. Usually pulled from the webpage element we are linking to. * @returns {String} - hyphen-delimited text for use in IDs and URLs. */ - this.urlify = function(text) { + this.urlify = function (text) { // Regex for finding the nonsafe URL characters (many need escaping): & +$,:;=?@"#{}|^~[`%!'<>]./()*\ var nonsafeChars = /[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\]/g, urlText; @@ -260,7 +260,7 @@ * @param {HTMLElemnt} el - a DOM node * @returns {Boolean} true/false */ - this.hasAnchorJSLink = function(el) { + this.hasAnchorJSLink = function (el) { var hasLeftAnchor = el.firstChild && (' ' + el.firstChild.className + ' ').indexOf(' anchorjs-link ') > -1, diff --git a/assets/site.js b/assets/site.js index f86584f2..a624be7b 100644 --- a/assets/site.js +++ b/assets/site.js @@ -7,7 +7,7 @@ anchors.add('h3'); // Filter UI var tocElements = document.getElementById('toc').getElementsByTagName('li'); -document.getElementById('filter-input').addEventListener('keyup', function(e) { +document.getElementById('filter-input').addEventListener('keyup', function (e) { var i, element, children; // enter key @@ -22,14 +22,14 @@ document.getElementById('filter-input').addEventListener('keyup', function(e) { } } - var match = function() { + var match = function () { return true; }; var value = this.value.toLowerCase(); if (!value.match(/^\s*$/)) { - match = function(element) { + match = function (element) { var html = element.firstChild.innerHTML; return html && html.toLowerCase().indexOf(value) !== -1; }; @@ -114,12 +114,12 @@ var cw_without_sb = split_left.clientWidth; split_left.style.overflow = ''; Split(['#split-left', '#split-right'], { - elementStyle: function(dimension, size, gutterSize) { + elementStyle: function (dimension, size, gutterSize) { return { 'flex-basis': 'calc(' + size + '% - ' + gutterSize + 'px)' }; }, - gutterStyle: function(dimension, gutterSize) { + gutterStyle: function (dimension, gutterSize) { return { 'flex-basis': gutterSize + 'px' }; @@ -152,9 +152,9 @@ function loadState(ev) { } } -window.addEventListener('load', function() { +window.addEventListener('load', function () { // Restore after Firefox scrolls to hash. - setTimeout(function() { + setTimeout(function () { loadState(); // Update with initial scroll position. updateState(); diff --git a/index.html b/index.html index f84937b8..e119ab01 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@
-0.28.0
0.28.1
peerStore
Connection
will be returned
Get all open connections with a peer.
+ +(PeerId)
+
+ Array<Connection>
:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
true
or false
.
-
+
src/metrics/index.js
@@ -9538,7 +9623,7 @@ resolve to either true
or false
.
-
+
src/metrics/index.js
@@ -9593,7 +9678,7 @@ will be ignored.
-
+
src/metrics/index.js
@@ -9648,7 +9733,7 @@ Once stop
is called, start
must be called to resume st
-
+
src/metrics/index.js
@@ -9710,7 +9795,7 @@ Once stop
is called, start
must be called to resume st
-
+
src/metrics/index.js
@@ -9772,7 +9857,7 @@ Once stop
is called, start
must be called to resume st
-
+
src/metrics/index.js
@@ -9848,7 +9933,7 @@ is a live peer, or in the disconnected peer LRU cache.
-
+
src/metrics/index.js
@@ -9910,7 +9995,7 @@ is a live peer, or in the disconnected peer LRU cache.
-
+
src/metrics/index.js
@@ -9985,7 +10070,7 @@ is a live peer, or in the disconnected peer LRU cache.
-
+
src/metrics/index.js
@@ -10054,7 +10139,7 @@ be stopped and moved to an LRU for temporary retention.
-
+
src/metrics/index.js
@@ -10132,7 +10217,7 @@ placeholder stats will be merged with the existing stats.
-
+
src/metrics/index.js
@@ -10262,7 +10347,7 @@ with the placeholder string returned from here, and the known PeerId
-
+
src/metrics/index.js
@@ -10346,7 +10431,7 @@ and returned.
-
+
src/metrics/old-peers.js
@@ -10421,7 +10506,7 @@ and returned.
-
+
src/metrics/stats.js
@@ -10501,7 +10586,7 @@ and returned.
Stats.stop
was previously called,
PeerId
of the peer.
-
+
src/peer-store/address-book.js
@@ -13459,7 +13544,7 @@ will include the encapsulated PeerId
of the peer.
-
+
src/peer-store/proto-book.js
@@ -13490,6 +13575,1065 @@ will include the encapsulated PeerId
of the peer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The KeyBook is responsible for keeping the known public keys of a peer.
+ ++ Extends + + Book + +
+ + + + + + + + + + +(PeerStore)
+
+ Map known peers to their known Public Key.
+ +Set the Peer public key.
+ +(PeerId)
+
+ ((RsaPublicKey | Ed25519PublicKey | Secp256k1PublicKey))
+
+ KeyBook
:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Get Public key of the given PeerId, if stored.
+ +(PeerId)
+
+ (RsaPublicKey | Ed25519PublicKey | Secp256k1PublicKey)
:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The MetadataBook is responsible for keeping the known supported +protocols of a peer.
+ ++ Extends + + Book + +
+ + + + + + + + + + +(PeerStore)
+
+ Set metadata key and value of a provided peer.
+ + + + + + + + + + + + + +(PeerId)
+
+ (string)
+ metadata key
+
+ (Buffer)
+ metadata value
+
+ ProtoBook
:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Set data into the datastructure
+ +(any)
+
+ (any)
+
+ (any)
+
+ (Object
+ = {}
)
+
+ Name | +Description | +
---|---|
$3.emit any
+
+ (default true )
+ |
+ + |
Get the known data of a provided peer.
+ + + + + + + + + + + + + +(PeerId)
+
+ Map<string, Buffer>
:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Get specific metadata value, if it exists
+ + + + + + + + + + + + + +(PeerId)
+
+ (string)
+
+ Buffer
:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Deletes the provided peer from the book.
+ +(PeerId)
+
+ boolean
:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Deletes the provided peer metadata key from the book.
+ + + + + + + + + + + + + +(PeerId)
+
+ (string)
+
+ boolean
:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+PeerStore Event emitter, used by the MetadataBook to emit: +"change:metadata" - emitted when the known metadata of a peer change.
+ +PeerId
of the peer.
-
+
src/peer-store/book.js
@@ -13637,7 +14781,7 @@ will include the encapsulated PeerId
of the peer.
PeerId
of the peer.
PeerId
of the peer.
PeerId
of the peer.
PeerId
of the peer.
The KeyBook is responsible for keeping the known public keys of a peer.
- -- Extends - - Book - -
- - - - - - - - - - -(PeerStore)
-
- Map known peers to their known Public Key.
- -Set the Peer public key.
- -(PeerId)
-
- ((RsaPublicKey | Ed25519PublicKey | Secp256k1PublicKey))
-
- KeyBook
:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Get Public key of the given PeerId, if stored.
- -(PeerId)
-
- (RsaPublicKey | Ed25519PublicKey | Secp256k1PublicKey)
:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-The MetadataBook is responsible for keeping the known supported -protocols of a peer.
- -- Extends - - Book - -
- - - - - - - - - - -(PeerStore)
-
- Set metadata key and value of a provided peer.
- - - - - - - - - - - - - -(PeerId)
-
- (string)
- metadata key
-
- (Buffer)
- metadata value
-
- ProtoBook
:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Set data into the datastructure
- -(any)
-
- (any)
-
- (any)
-
- (Object
- = {}
)
-
- Name | -Description | -
---|---|
$3.emit any
-
- (default true )
- |
- - |
Get the known data of a provided peer.
- - - - - - - - - - - - - -(PeerId)
-
- Map<string, Buffer>
:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Get specific metadata value, if it exists
- - - - - - - - - - - - - -(PeerId)
-
- (string)
-
- Buffer
:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Deletes the provided peer from the book.
- -(PeerId)
-
- boolean
:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Deletes the provided peer metadata key from the book.
- - - - - - - - - - - - - -(PeerId)
-
- (string)
-
- boolean
:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-PeerStore Event emitter, used by the MetadataBook to emit: -"change:metadata" - emitted when the known metadata of a peer change.
- -