Skip to content

Commit 3d696a5

Browse files
committed
docs: Cleaned up English grammar in a few more places
1 parent 2c33af1 commit 3d696a5

File tree

5 files changed

+28
-26
lines changed

5 files changed

+28
-26
lines changed

config/.mocharc.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ const mochaSettings = {
66
exit: true,
77
reporter: 'spec'
88
};
9+
910
if (process.env.TRAVIS) {
1011
// this is so high because travis has different machines
1112
// that are randomly slow
1213
mochaSettings.timeout = 120 * 1000;
1314
mochaSettings.reporter = 'min';
14-
};
15+
}
16+
1517
if (process.env.NODE_PROF) {
16-
console.log('profiler actived:');
18+
console.log('profiler activated:');
1719
mochaSettings.prof = true;
1820
mochaSettings.bail = false;
1921
}
2022

21-
module.exports = mochaSettings;
23+
module.exports = mochaSettings;

docs-src/adapters.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# PouchDB Adapters
22

3-
When you use the PouchDB `RxStorage`, there are many adapters that define where the data has to be stored.
4-
Depending on which environment you work in, you can choose between different adapters. For example in the browser you want to store the data inside of IndexedDB but on NodeJs you want to store the data on the filesystem.
3+
When you use PouchDB `RxStorage`, there are many adapters that define where the data has to be stored.
4+
Depending on which environment you work in, you can choose between different adapters. For example, in the browser you want to store the data inside of IndexedDB but on NodeJS you want to store the data on the filesystem.
55

66
This page is an overview over the different adapters with recommendations on what to use where.
77

8-
**Please always ensure that your pouchdb adapter-version is the same as `pouchdb-core` in the [rxdb package.json](https://github.com/pubkey/rxdb/blob/master/package.json). Otherwise you might have strange problems**
8+
**Please always ensure that your pouchdb adapter-version is the same as `pouchdb-core` in the [rxdb package.json](https://github.com/pubkey/rxdb/blob/master/package.json). Otherwise, you might have strange problems**
99

1010
# Any environment
1111

1212
## Memory
1313
In any environment, you can use the memory-adapter. It stores the data in the javascript runtime memory. This means it is not persistent and the data is lost when the process terminates.
1414

1515
Use this adapter when:
16-
- You want to have a really good performance
16+
- You want to have really good performance
1717
- You do not want persistent state, for example in your test suite
1818

1919
```js

docs-src/plugins.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Creating Plugins
22

3-
Creating an own plugin is very simple. A plugin is basically an javascript-object which overwrites or extends RxDB's internal classes, prototypes and hooks.
3+
Creating your own plugin is very simple. A plugin is basically a javascript-object which overwrites or extends RxDB's internal classes, prototypes, and hooks.
44

5-
A basic plugins:
5+
A basic plugin:
66

77
```javascript
88

@@ -12,7 +12,7 @@ const myPlugin = {
1212
* (optional) init() method
1313
* that is called when the plugin is added to RxDB for the first time.
1414
*/
15-
init(){
15+
init() {
1616
// import other plugins or initialize stuff
1717
},
1818
/**
@@ -27,13 +27,13 @@ const myPlugin = {
2727
* @param {object} prototype of RxCollection
2828
*/
2929
RxCollection: (proto) => {
30-
proto.hello = function(){
30+
proto.hello = function() {
3131
return 'world';
3232
};
3333
}
3434
},
3535
/**
36-
* some methods are static and can be overwritten in the overwriteable-object
36+
* some methods are static and can be overwritten in the overwritable-object
3737
*/
3838
overwritable: {
3939
validatePassword: function(password) {
@@ -46,7 +46,7 @@ const myPlugin = {
4646
*/
4747
hooks: {
4848
/**
49-
* add a foo-property to each document. You can then call myDocument.foo (='bar')
49+
* add a `foo` property to each document. You can then call myDocument.foo (='bar')
5050
*/
5151
createRxDocument: {
5252
/**
@@ -68,19 +68,19 @@ addRxPlugin(myPlugin);
6868

6969
## rxdb
7070

71-
The `rxdb`-property signals that this plugin is and rxdb-plugin and not a pouchdb-plugin. The value should always be `true`.
71+
The `rxdb`-property signals that this plugin is an rxdb-plugin and not a pouchdb-plugin. The value should always be `true`.
7272

7373
## prototypes
7474

75-
The `prototypes`-property contains a function for each of RxDB's internal prototype that you want to manipulate. Each function gets the prototype-object of the corresponding class as parameter and than can modify it. You can see a list of all available prototypes [here](https://github.com/pubkey/rxdb/blob/master/src/plugin.ts)
75+
The `prototypes`-property contains a function for each of RxDB's internal prototype that you want to manipulate. Each function gets the prototype-object of the corresponding class as parameter and then can modify it. You can see a list of all available prototypes [here](https://github.com/pubkey/rxdb/blob/master/src/plugin.ts)
7676

7777
## overwritable
7878

79-
Some of RxDB's functions are not inside of a class-prototype but are static. You can set and overwrite them with the `overwritable`-object. You can see a list of all overwriteables [here](https://github.com/pubkey/rxdb/blob/master/src/overwritable.ts).
79+
Some of RxDB's functions are not inside of a class-prototype but are static. You can set and overwrite them with the `overwritable`-object. You can see a list of all overwritables [here](https://github.com/pubkey/rxdb/blob/master/src/overwritable.ts).
8080

8181
# hooks
8282

83-
Sometimes you don't want to overwrite an existing RxDB-method, but extend it. You can do this by adding hooks which will be called each time the code jumps into the hooks corresponding call. You can find a list of all hooks here [here](https://github.com/pubkey/rxdb/blob/master/src/hooks.ts).
83+
Sometimes you don't want to overwrite an existing RxDB-method, but extend it. You can do this by adding hooks which will be called each time the code jumps into the hooks corresponding call. You can find a list of all hooks [here](https://github.com/pubkey/rxdb/blob/master/src/hooks.ts).
8484

8585
# options
8686

orga/releases/12.0.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ Changes to `RxStorageInterface`:
202202
There are many things that can be done by **you** to improve RxDB:
203203

204204
- Check the [BACKLOG](https://github.com/pubkey/rxdb/blob/master/orga/BACKLOG.md) for features that would be great to have.
205-
- Check the [breaking backlog](https://github.com/pubkey/rxdb/blob/master/orga/before-next-major.md) for breaking changes that must be implemented in the future but where I did not had the time yet.
205+
- Check the [breaking backlog](https://github.com/pubkey/rxdb/blob/master/orga/before-next-major.md) for breaking changes that must be implemented in the future but where I did not have the time yet.
206206
- Check the [TODOs](https://github.com/pubkey/rxdb/search?q=TODO) in the code. There are many small improvements that can be done for performance and build size.
207-
- Review the code and add tests. I am only a single human with a laptop. My code is not perfect and much small improvements can be done when people review the code and help me to clearify undefined behaviors.
207+
- Review the code and add tests. I am only a single human with a laptop. My code is not perfect and much small improvements can be done when people review the code and help me to clarify undefined behaviors.
208208
- Improve the documentation. In the last user survey, many users told me that the documentation is not good enough. But I reviewed the docs and could not find clear flaws. The problem is that I am way too deep into RxDB so that I am not able to understand which documentation a newcomer to the project needs. Likely I assume too much knowledge or focus writing about the wrong parts.
209209
- Update the [example projects](https://github.com/pubkey/rxdb/tree/master/examples) many of them are outdated and need updates.
210210
- Help the next [PouchDB release](https://github.com/pouchdb/pouchdb/issues/8408) to improve RxDBs performance.

src/overwritable.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* functions that can or should be overwritten by plugins
3-
* IMPORTANT: Do not import any big stuff from RxDB here,
4-
* the 'overwritable' can be used inside of WebWorkers for the RxStorage only and
5-
* we do not want to have the full RxDB lib bundled in them.
3+
* IMPORTANT: Do not import any big stuff from RxDB here!
4+
* An 'overwritable' can be used inside WebWorkers for RxStorage only,
5+
* and we do not want to have the full RxDB lib bundled in them.
66
*/
77

88
import type { DeepReadonly } from './types/util';
@@ -12,7 +12,7 @@ import {
1212

1313
export const overwritable = {
1414
/**
15-
* if this method is overwritte with one
15+
* if this method is overwritten with one
1616
* that returns true, we do additional checks
1717
* which help the developer but have bad performance
1818
*/
@@ -22,8 +22,8 @@ export const overwritable = {
2222

2323
/**
2424
* Deep freezes and object when in dev-mode.
25-
* Deep-Freezing has the same performaance as deep-cloning, so we only do that in dev-mode.
26-
* Also we can ensure the readonly state via typescript
25+
* Deep-Freezing has the same performance as deep-cloning, so we only do that in dev-mode.
26+
* Also, we can ensure the readonly state via typescript
2727
* @link https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
2828
*/
2929
deepFreezeWhenDevMode<T>(obj: T): DeepReadonly<T> {
@@ -40,7 +40,7 @@ export const overwritable = {
4040
},
4141

4242
/**
43-
* overwritte to map error-codes to text-messages
43+
* overwritten to map error-codes to text-messages
4444
*/
4545
tunnelErrorMessage(message: string): string {
4646
return `RxDB Error-Code ${message}.

0 commit comments

Comments
 (0)