mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
docs: Formatting.
This commit is contained in:
@@ -91,6 +91,15 @@ const Database = async ({ ipfs, identity, address, name, access, directory, meta
|
||||
|
||||
const log = await Log(identity, { logId: address, access, entryStorage, headsStorage, indexStorage })
|
||||
|
||||
/**
|
||||
* Event emitter that emits Database changes.
|
||||
* @†ype EventEmitter
|
||||
* @fires update when addOperation or applyOperation completes.
|
||||
* @fires close when the database is successfully closed.
|
||||
* @fires drop when the database is successfully dropped.
|
||||
* @memberof module:Sync~Sync
|
||||
* @instance
|
||||
*/
|
||||
const events = new EventEmitter()
|
||||
|
||||
const queue = new PQueue({ concurrency: 1 })
|
||||
|
||||
@@ -83,8 +83,8 @@ const Documents = ({ indexBy } = DefaultOptions) => async ({ ipfs, identity, add
|
||||
* @function
|
||||
* @param {function(Object)} findFn A function for querying for specific
|
||||
* results.
|
||||
*
|
||||
* The findFn function's signature takes the form `function(doc)` where doc
|
||||
*
|
||||
* The findFn function's signature takes the form `function(doc)` where doc
|
||||
* is a document's value property. The function should return true if the
|
||||
* document is found, false otherwise.
|
||||
* @return {Array} Found documents.
|
||||
|
||||
12
src/sync.js
12
src/sync.js
@@ -81,7 +81,7 @@ const Sync = async ({ ipfs, log, events, onSynced, start, timeout }) => {
|
||||
|
||||
/**
|
||||
* Callback function when new heads have been received from other peers.
|
||||
* @callback module:Sync~onSynced
|
||||
* @callback module:Sync~Sync#onSynced
|
||||
* @param {PeerID} peerId PeerID of the peer who we received heads from
|
||||
* @param {Entry[]} heads An array of Log entries
|
||||
*/
|
||||
@@ -130,12 +130,12 @@ const Sync = async ({ ipfs, log, events, onSynced, start, timeout }) => {
|
||||
const peers = new Set()
|
||||
|
||||
/**
|
||||
* Event emitter that emits updates.
|
||||
* @name events
|
||||
* Event emitter that emits Sync changes.
|
||||
* @†ype EventEmitter
|
||||
* @fires join when a peer has connected and heads were exchanged
|
||||
* @fires leave when a peer disconnects
|
||||
* @fires error when an error occurs
|
||||
* @fires module:Sync~Sync#join when a peer has connected and heads are
|
||||
* exchanged
|
||||
* @fires module:Sync~Sync#leave when a peer disconnects
|
||||
* @fires module:Sync~Sync#error when an error occurs
|
||||
* @memberof module:Sync~Sync
|
||||
* @instance
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { strictEqual, notStrictEqual, deepStrictEqual } from 'assert'
|
||||
import { default as OrbitDBAddress, isValidAddress, parseAddress } from '../src/address.js'
|
||||
import OrbitDBAddress, { isValidAddress, parseAddress } from '../src/address.js'
|
||||
|
||||
describe('Address', function () {
|
||||
describe('Creating an address from full address string', () => {
|
||||
|
||||
Reference in New Issue
Block a user