Skip to content

Commit

Permalink
docs: add missing semicolons to follower example code
Browse files Browse the repository at this point in the history
Signed-off-by: Esteban Laver <[email protected]>
  • Loading branch information
emlaver committed Oct 26, 2023
1 parent 9b951c0 commit 9a32ef2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions test/examples/src/features/js/startAndProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const client = CloudantV1.newInstance();
// Start from a previously persisted seq
// Normally this would be read by the app from persistent storage
// e.g. previouslyPersistedSeq = yourAppPersistenceReadFunc()
const previouslyPersistedSeq = '3-g1AG3...'
const previouslyPersistedSeq = '3-g1AG3...';
const changesParams = {
db: 'example',
since: previouslyPersistedSeq
Expand All @@ -35,10 +35,10 @@ const destinationStream = new Writable({
// do something with change item
console.log(changesItem.id);
for (const change of changesItem.changes) {
console.log(change.rev)
console.log(change.rev);
}
// when change item processing is complete app can store seq
const seq = changesItem.seq
const seq = changesItem.seq;
// write seq to persistent storage for use as since if required to resume later
// e.g. yourAppPersistenceWriteFunc()
callback();
Expand Down
12 changes: 6 additions & 6 deletions test/examples/src/features/js/startOneOffAndProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const client = CloudantV1.newInstance();
// Start from a previously persisted seq
// Normally this would be read by the app from persistent storage
// e.g. previouslyPersistedSeq = yourAppPersistenceReadFunc()
const previouslyPersistedSeq = '3-g1AG3...'
const previouslyPersistedSeq = '3-g1AG3...';
const changesParams = {
db: 'example',
since: previouslyPersistedSeq
Expand All @@ -35,10 +35,10 @@ const destinationStream = new Writable({
// do something with change item
console.log(changesItem.id);
for (const change of changesItem.changes) {
console.log(change.rev)
console.log(change.rev);
}
// when change item processing is complete app can store seq
const seq = changesItem.seq
const seq = changesItem.seq;
// write seq to persistent storage for use as since if required to resume later
// e.g. yourAppPersistenceWriteFunc()
callback();
Expand All @@ -62,12 +62,12 @@ async function getChangesFromFollower(changesItemsStream) {
// write seq to persistent storage for use as since
console.log(changesItem.id);
for (const change of changesItem.changes) {
console.log(change.rev)
console.log(change.rev);
}
// when change item processing is complete app can store seq
seq = changesItem.seq
seq = changesItem.seq;
// write seq to persistent storage for use as since if required to resume later
// e.g. yourAppPersistenceWriteFunc()
// e.g. yourAppPersistenceWriteFunc();
}
}
*/
8 changes: 4 additions & 4 deletions test/examples/src/features/ts/startAndProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
import { ChangesFollower, CloudantV1, Stream } from '../../../../../index';
import { ChangesResultItem, PostChangesParams } from '../../../../../cloudant/v1';
import { Writable } from 'node:stream';
import { pipeline } from 'node:stream/promises'
import { pipeline } from 'node:stream/promises';

const client = CloudantV1.newInstance({});
// Start from a previously persisted seq
// Normally this would be read by the app from persistent storage
// e.g. previouslyPersistedSeq = yourAppPersistenceReadFunc()
const previouslyPersistedSeq = '3-g1AG3...'
const previouslyPersistedSeq = '3-g1AG3...';
const changesParams: PostChangesParams = {
db: 'example',
since: previouslyPersistedSeq
Expand All @@ -36,10 +36,10 @@ const destinationStream = new Writable({
// do something with change item
console.log(changesItem.id);
for (const change of changesItem.changes) {
console.log(change.rev)
console.log(change.rev);
}
// when change item processing is complete app can store seq
const seq = changesItem.seq
const seq = changesItem.seq;
// write seq to persistent storage for use as since if required to resume later
// e.g. yourAppPersistenceWriteFunc()
callback();
Expand Down
14 changes: 7 additions & 7 deletions test/examples/src/features/ts/startOneOffAndProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
import { ChangesFollower, CloudantV1, Stream } from '../../../../../index';
import { ChangesResultItem, PostChangesParams } from '../../../../../cloudant/v1';
import { Writable } from 'node:stream';
import { pipeline } from 'node:stream/promises'
import { pipeline } from 'node:stream/promises';

const client = CloudantV1.newInstance({});
// Start from a previously persisted seq
// Normally this would be read by the app from persistent storage
// e.g. previouslyPersistedSeq = yourAppPersistenceReadFunc()
const previouslyPersistedSeq = '3-g1AG3...'
const previouslyPersistedSeq = '3-g1AG3...';
const changesParams: PostChangesParams = {
db: 'example',
since: previouslyPersistedSeq
Expand All @@ -36,10 +36,10 @@ const destinationStream = new Writable({
// do something with change item
console.log(changesItem.id);
for (const change of changesItem.changes) {
console.log(change.rev)
console.log(change.rev);
}
// when change item processing is complete app can store seq
const seq = changesItem.seq
const seq = changesItem.seq;
// write seq to persistent storage for use as since if required to resume later
// e.g. yourAppPersistenceWriteFunc()
callback();
Expand All @@ -63,12 +63,12 @@ async function getChangesFromFollower(changesItemsStream: Stream<CloudantV1.Chan
// write seq to persistent storage for use as since
console.log(changesItem.id);
for (const change of changesItem.changes) {
console.log(change.rev)
console.log(change.rev);
}
// when change item processing is complete app can store seq
seq = changesItem.seq
seq = changesItem.seq;
// write seq to persistent storage for use as since if required to resume later
// e.g. yourAppPersistenceWriteFunc()
// e.g. yourAppPersistenceWriteFunc();
}
}
*/
2 changes: 1 addition & 1 deletion test/examples/src/features/ts/stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { ChangesFollower, CloudantV1, Stream } from '../../../../../index';
import { ChangesResultItem, PostChangesParams } from '../../../../../cloudant/v1';
import { Writable } from 'node:stream';
import { pipeline } from 'node:stream/promises'
import { pipeline } from 'node:stream/promises';


const client = CloudantV1.newInstance({});
Expand Down

0 comments on commit 9a32ef2

Please sign in to comment.