Skip to content

Commit 73c5bcd

Browse files
authored
Remove superfluous trailing whitespace & correct typos (#288)
1 parent 351a59a commit 73c5bcd

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ and to use an existing database:
122122
const alice = nano.db.use('alice');
123123
```
124124

125-
Under-the-hood, calls like `nano.db.create` are making HTTP API calls to the CouchDB service. Such operations are *asynchronous*. There are two ways to recieve the asynchronous data back from the library
125+
Under-the-hood, calls like `nano.db.create` are making HTTP API calls to the CouchDB service. Such operations are *asynchronous*. There are two ways to receive the asynchronous data back from the library
126126

127127
1) Promises
128128

@@ -213,9 +213,9 @@ You can also pass options to the require to specify further configuration option
213213
// nano parses the URL and knows this is a database
214214
const opts = {
215215
url: 'http://localhost:5984/foo',
216-
requestDefaults: {
217-
proxy: {
218-
protocol: 'http',
216+
requestDefaults: {
217+
proxy: {
218+
protocol: 'http',
219219
host: 'myproxy.net'
220220
},
221221
headers: {
@@ -268,10 +268,10 @@ const myagent = new http.Agent({
268268
maxSockets: 25
269269
})
270270

271-
const db = require('nano')({
271+
const db = require('nano')({
272272
url: 'http://localhost:5984/foo',
273-
requestDefaults : {
274-
agent : myagent
273+
requestDefaults : {
274+
agent : myagent
275275
}
276276
});
277277
```
@@ -374,7 +374,7 @@ has to exist, add `create_target:true` to `opts` to create it prior to
374374
replication:
375375

376376
```js
377-
const response = await nano.db.replicate('alice',
377+
const response = await nano.db.replicate('alice',
378378
'http://admin:password@otherhost.com:5984/alice',
379379
{ create_target:true })
380380
```
@@ -386,7 +386,7 @@ with options `opts`. `target` has to exist, add `create_target:true` to
386386
`opts` to create it prior to replication. Replication will survive server restarts.
387387

388388
```js
389-
const response = await nano.db.replication.enable('alice',
389+
const response = await nano.db.replication.enable('alice',
390390
'http://admin:password@otherhost.com:5984/alice',
391391
{ create_target:true })
392392
```
@@ -397,7 +397,7 @@ Queries the state of replication using the new CouchDB API. The `id` comes from
397397
given by the call to `replication.enable`:
398398

399399
```js
400-
const r = await nano.db.replication.enable('alice',
400+
const r = await nano.db.replication.enable('alice',
401401
'http://admin:password@otherhost.com:5984/alice',
402402
{ create_target:true })
403403
const q = await nano.db.replication.query(r.id)
@@ -409,7 +409,7 @@ Disables replication using the new CouchDB API. The `id` comes from the response
409409
by the call to `replication.enable`:
410410

411411
```js
412-
const r = await nano.db.replication.enable('alice',
412+
const r = await nano.db.replication.enable('alice',
413413
'http://admin:password@otherhost.com:5984/alice',
414414
{ create_target:true })
415415
await nano.db.replication.disable(r.id);
@@ -671,7 +671,7 @@ If you want `changesReader` to hold off making the next `_changes` API call unti
671671
db.changesReader.get({wait: true})
672672
.on('batch', (b) => {
673673
console.log('a batch of', b.length, 'changes has arrived');
674-
// do some asynchronous work here and call "changesReader.resume()"
674+
// do some asynchronous work here and call "changesReader.resume()"
675675
// when you're ready for the next API call to be dispatched.
676676
// In this case, wait 5s before the next changes feed request.
677677
setTimeout( () => {
@@ -692,7 +692,7 @@ You may supply a number of options when you start to listen to the changes feed:
692692
| wait | For `get`/`start` mode, automatically pause the changes reader after each request. When the the user calls `resume()`, the changes reader will resume. | false | e.g. true |
693693
| fastChanges | Adds a seq_interval parameter to fetch changes more quickly | false | true | |
694694
| selector | Filters the changes feed with the supplied Mango selector | {"name":"fred} | null | |
695-
| timeout | The number of milliseconds a changes feed request waits for data| 60000 | 10000
695+
| timeout | The number of milliseconds a changes feed request waits for data| 60000 | 10000 |
696696
697697
The events it emits are as follows:s
698698
@@ -734,7 +734,7 @@ The `batch` event delivers an array of change objects.
734734
735735
## Partition Functions
736736
737-
Functions related to [partitioned databses](https://docs.couchdb.org/en/latest/partitioned-dbs/index.html).
737+
Functions related to [partitioned databases](https://docs.couchdb.org/en/latest/partitioned-dbs/index.html).
738738
739739
Create a partitioned database by passing `{ partitioned: true }` to `db.create`:
740740
@@ -771,7 +771,7 @@ const i = {
771771
partitioned: true,
772772
type: 'json'
773773
}
774-
774+
775775
// instruct CouchDB to create the index
776776
await db.index(i)
777777
```
@@ -784,7 +784,7 @@ const func = function(doc) {
784784
index('name', doc.name)
785785
index('latin', doc.latin)
786786
}
787-
787+
788788
// the design document containing the search definition function
789789
const ddoc = {
790790
_id: '_design/search-ddoc',
@@ -807,7 +807,7 @@ MapReduce views can be created by writing a design document with `opts.partition
807807
const func = function(doc) {
808808
emit(doc.family, doc.weight)
809809
}
810-
810+
811811
// Design Document
812812
const ddoc = {
813813
_id: '_design/view-ddoc',
@@ -821,7 +821,7 @@ const ddoc = {
821821
partitioned: true
822822
}
823823
}
824-
824+
825825
// create design document
826826
await db.insert(ddoc)
827827
```

0 commit comments

Comments
 (0)