From fac1f735726a417ad223fe4e5d27c54d92a1046e Mon Sep 17 00:00:00 2001 From: Vivek Singh <47470314+heyitsvi@users.noreply.github.com> Date: Fri, 16 Feb 2024 19:16:16 +0530 Subject: [PATCH] Fix grammar in docs (#49) * fix grammar in readme * fix grammar in compact-encoding * fix grammar in hyperdht * fix grammar in hyperdrive * fix grammar in hypercore * fix grammar in hyperswarm * fix grammar in localdrive * fix grammar in mirrordrive * fix grammar in sharing-a-pear-app * tiny fixes --- building-blocks/hypercore.md | 6 +++--- building-blocks/hyperdht.md | 2 +- building-blocks/hyperdrive.md | 2 +- building-blocks/hyperswarm.md | 2 +- guide/making-a-pear-terminal-app.md | 4 ++-- guide/sharing-a-pear-app.md | 2 +- helpers/compact-encoding.md | 2 +- helpers/localdrive.md | 2 +- helpers/mirrordrive.md | 2 +- readme.md | 12 ++++++------ reference/api.md | 4 ++-- reference/configuration.md | 2 +- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/building-blocks/hypercore.md b/building-blocks/hypercore.md index f0ce386..37b01e6 100644 --- a/building-blocks/hypercore.md +++ b/building-blocks/hypercore.md @@ -345,7 +345,7 @@ await core.clear(4) // clear block 4 from local cache await core.clear(0, 10) // clear block 0-10 from local cache ``` -The core will also 'gossip' with peers it is connected to, that is no longer has these blocks. +The core will also 'gossip' with peers it is connected to, that no longer have these blocks. #### **`await core.truncate(newLength, [forkId])`** @@ -385,7 +385,7 @@ A range can have the following properties: To download the full core continuously (often referred to as non-sparse mode): ```javascript -// Note that this will never be consider downloaded as the range +// Note that this will never be considered downloaded as the range // will keep waiting for new blocks to be appended. core.download({ start: 0, end: -1 }) ``` @@ -567,7 +567,7 @@ Emitted after the core has initially opened all its internal state. #### **`core.on('close')`** -Emitted when the core has been fully closed +Emitted when the core has been fully closed. #### **`core.on('peer-add')`** diff --git a/building-blocks/hyperdht.md b/building-blocks/hyperdht.md index ce57a18..488db29 100644 --- a/building-blocks/hyperdht.md +++ b/building-blocks/hyperdht.md @@ -176,7 +176,7 @@ const encryptedSocket = node.connect(remotePublicKey) | Property | Description | Type | Default | | ------------- | -------------------------------------------------------- | ------ | --------------------- | | **`nodes`** | optional array of close dht nodes to speed up connecting | Array | `[]` | -| **`keyPair`** | optional key pair to use when connection | Object | `node.defaultKeyPair` | +| **`keyPair`** | optional key pair to use when connecting | Object | `node.defaultKeyPair` | #### Properties diff --git a/building-blocks/hyperdrive.md b/building-blocks/hyperdrive.md index 474059e..0fd92db 100644 --- a/building-blocks/hyperdrive.md +++ b/building-blocks/hyperdrive.md @@ -109,7 +109,7 @@ The public key of the [Hyperblobs](https://github.com/holepunchto/hyperblobs) in #### **`drive.version`** -The number that indicates how many modifications were made, is useful as a version identifier. +The number that indicates how many modifications were made, it is useful as a version identifier. #### **`drive.supportsMetadata`** diff --git a/building-blocks/hyperswarm.md b/building-blocks/hyperswarm.md index 45b9089..21deb12 100644 --- a/building-blocks/hyperswarm.md +++ b/building-blocks/hyperswarm.md @@ -203,7 +203,7 @@ Ban or unban the peer. Banning will prevent any future reconnection attempts, bu ### Peer Discovery -`swarm.join` returns a `PeerDiscovery` instance which allows for both the controlling of discovery behavior and responding to lifesycle changes during discovery. +`swarm.join` returns a `PeerDiscovery` instance which allows for both controlling discovery behavior and responding to lifecycle changes during discovery. #### Methods diff --git a/guide/making-a-pear-terminal-app.md b/guide/making-a-pear-terminal-app.md index a9c8737..34bb231 100644 --- a/guide/making-a-pear-terminal-app.md +++ b/guide/making-a-pear-terminal-app.md @@ -90,7 +90,7 @@ function appendMessage ({ name, message }) { ## Step 3. Run in dev mode -To test this chat app, in one terminal run `pear dev .`. +To test this chat app, in one terminal run `pear dev .` The app will output something similar to: @@ -98,7 +98,7 @@ The app will output something similar to: [info] Created new chat room: a1b2c35fbeb452bc900c5a1c00306e52319a3159317312f54fe5a246d634f51a ``` -In another terminal use this key as input, `pear dev . a1b2c35fbeb452bc900c5a1c00306e52319a3159317312f54fe5a246d634f51a`. +In another terminal use this key as input, `pear dev . a1b2c35fbeb452bc900c5a1c00306e52319a3159317312f54fe5a246d634f51a` The app will output: diff --git a/guide/sharing-a-pear-app.md b/guide/sharing-a-pear-app.md index b9d337c..a69db1e 100644 --- a/guide/sharing-a-pear-app.md +++ b/guide/sharing-a-pear-app.md @@ -80,7 +80,7 @@ This will output something similar to the following ^_^ announced ``` -As long as the process is running the application is being seeded. If other peers reseed the application the original process could be closed. Be sure to keep the terminal open this process running. +As long as the process is running the application is being seeded. If other peers reseed the application the original process could be closed. Be sure to keep the terminal open while this process is running. ## Step 4. Run the app on another machine diff --git a/helpers/compact-encoding.md b/helpers/compact-encoding.md index 708bad8..4a7fdcc 100644 --- a/helpers/compact-encoding.md +++ b/helpers/compact-encoding.md @@ -32,7 +32,7 @@ An object with the keys`{ start, end, buffer, cache }`. | `start` | Byte offset to start encoding/decoding at. | | `end` | Byte offset indicating the end of the buffer. | | `buffer` | Either a Node.js Buffer or Uint8Array. | -| `cache` | Used internally be codecs, starts as `null`. | +| `cache` | Used internally by codecs, starts as `null`. | > Users can also get a blank state object using`cenc.state()`. diff --git a/helpers/localdrive.md b/helpers/localdrive.md index 5c01dbf..7228fae 100644 --- a/helpers/localdrive.md +++ b/helpers/localdrive.md @@ -78,7 +78,7 @@ String with the resolved (absolute) drive path. **`drive.supportsMetadata`** -Boolean that indicates if the drive handles or not metadata. Default `false`. +Boolean indicating whether the drive handles metadata. Default `false`. If `options.metadata` hooks are passed then `supportsMetadata` becomes `true`. diff --git a/helpers/mirrordrive.md b/helpers/mirrordrive.md index 5d01080..6ca78b7 100644 --- a/helpers/mirrordrive.md +++ b/helpers/mirrordrive.md @@ -71,7 +71,7 @@ console.log(mirror.count) // => { files: 0, add: 0, remove: 0, change: 0 } #### **`await mirror.done()`** -It starts processing all the diffing until is done. +It starts processing all the diffing until it is done. ```javascript const mirror = new MirrorDrive(src, dst) diff --git a/readme.md b/readme.md index 10bb56a..73fd291 100644 --- a/readme.md +++ b/readme.md @@ -68,7 +68,7 @@ Notable features include: ### Hyperswarm **stable** -The [`hyperswarm`](./building-blocks/hyperswarm.md) module is a high-level API for finding and connecting to peers who are interested in a "topic." +The [`hyperswarm`](./building-blocks/hyperswarm.md) module is a high-level API for finding and connecting to peers who are interested in a "topic". Notable features include: @@ -78,7 +78,7 @@ Notable features include: ### Hyperdrive **stable** -The [`hyperdrive`](./building-blocks/hyperdrive.md) module is a secure, real-time distributed file system that simplifies P2P file sharing that provides an efficient way to store and access data across multiple connected devices in a decentralized manner. +The [`hyperdrive`](./building-blocks/hyperdrive.md) module is a secure, real-time distributed file system that simplifies P2P file sharing. It provides an efficient way to store and access data across multiple connected devices in a decentralized manner. * Uses Hyperbee internally for storing file metadata * Major API simplification. Instead of mirroring POSIX APIs, the new API better captures the core requirements of P2P file transfer. @@ -90,8 +90,8 @@ The [`autobase`](./building-blocks/autobase.md) experimental module provides a " Notable features include: -* automatic rebasing of multiple causally-linked Hypercores into a single, linearized Hypercore for multi-user collaboration -* low-friction integration into higher-level modules like Hyperbee and Hyperdrive: Autobase's output shares the familiar Hypercore API so peer-to-peer multi-user collaboration is achievable with little additional implementation effort. +* Automatic rebasing of multiple causally-linked Hypercores into a single, linearized Hypercore for multi-user collaboration. +* Low-friction integration into higher-level modules like Hyperbee and Hyperdrive: Autobase's output shares the familiar Hypercore API so peer-to-peer multi-user collaboration is achievable with little additional implementation effort. > Autobase is still experimental and is likely to change significantly in the near future. @@ -101,7 +101,7 @@ The `hyperdht` module is the Distributed Hash Table (DHT) powering Hyperswarm. T Notable features include: -* lower-level module provides direct access to the DHT for connecting peers using key pairs +* Lower-level module provides direct access to the DHT for connecting peers using key pairs. ## Helpers @@ -116,7 +116,7 @@ Helper modules can be used together with the building blocks to create cutting-e ## Tools -The following tools are used extensively employed in the day-to-day development and operation of applications built on Pear +The following tools are used extensively, employed in the day-to-day development and operation of applications built on Pear. | Tools | Description | | :----------------------------------------------------------: | :---------------------------------------------------------: | diff --git a/reference/api.md b/reference/api.md index 0fbdb5b..ecd1fde 100644 --- a/reference/api.md +++ b/reference/api.md @@ -263,7 +263,7 @@ Media interface ### `const status = await Pear.media.status.microphone()` -Resolves to: ``. +Resolves to: `` If access to the microphone is available, resolved value will be `'granted'`. @@ -271,7 +271,7 @@ Any other string indicates lack of permission. Possible values are `'granted'`, ### `const status = await Pear.media.status.camera()` -Resolves to: ``. +Resolves to: `` If access to the camera is available, resolved value will be `'granted'`. diff --git a/reference/configuration.md b/reference/configuration.md index edb2f7f..d5e3e71 100644 --- a/reference/configuration.md +++ b/reference/configuration.md @@ -14,7 +14,7 @@ Any other fields (such as `dependencies`) may also be present in the `package.js The `package.json` `pear` object contains application configuration and is exposed via the API as `pear.config.options`. -Pear versioning is automatic. The `package.json` file does **not** require a version field, the version field will be ignored.. +Pear versioning is automatic. The `package.json` file does **not** require a version field, the version field will be ignored. ## The `package.json` `pear` field.