Skip to content

Commit 89a830c

Browse files
committed
Fix all syntax errors in documentation
1 parent 0662da9 commit 89a830c

19 files changed

+34
-34
lines changed

doc/api/config/readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ We can do this by setting the `Rx.config.useNativeEvents` flag to `true`.
4545
Rx.config.useNativeEvents = true;
4646

4747
Rx.Observable.fromEvent(document, 'mousemove')
48-
.subscribe(e) {
48+
.subscribe(function (e) {
4949
console.log('ClientX: %d, ClientY: %d', e.clientX, e.clientY);
50-
}
50+
});
5151
```
5252
* * *

doc/api/core/notification.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var subscription = source.subscribe(
1818
console.log('Next: %s', x);
1919
},
2020
function (err) {
21-
console.log('Error: %s', err;
21+
console.log('Error: %s', err);
2222
},
2323
function () {
2424
console.log('Completed');
@@ -68,7 +68,7 @@ var subscription = source.subscribe(
6868
console.log('Next: %s', x);
6969
},
7070
function (err) {
71-
console.log('Error: %s', err;
71+
console.log('Error: %s', err);
7272
},
7373
function () {
7474
console.log('Completed');
@@ -101,7 +101,7 @@ var subscription = source.subscribe(
101101
console.log('Next: %s', x);
102102
},
103103
function (err) {
104-
console.log('Error: %s', err;
104+
console.log('Error: %s', err);
105105
},
106106
function () {
107107
console.log('Completed');
@@ -141,7 +141,7 @@ var subscription = source.subscribe(
141141
console.log('Next: %s', x);
142142
},
143143
function (err) {
144-
console.log('Error: %s', err;
144+
console.log('Error: %s', err);
145145
},
146146
function () {
147147
console.log('Completed');
@@ -214,7 +214,7 @@ var subscription = source.subscribe(
214214
console.log('Next: %s', x);
215215
},
216216
function (err) {
217-
console.log('Error: %s', err;
217+
console.log('Error: %s', err);
218218
},
219219
function () {
220220
console.log('Completed');
@@ -232,7 +232,7 @@ var subscription = source.subscribe(
232232
console.log('Next: %s', x);
233233
},
234234
function (err) {
235-
console.log('Error: %s', err;
235+
console.log('Error: %s', err);
236236
},
237237
function () {
238238
console.log('Completed');

doc/api/core/operators/and.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Propagates the observable sequence that reacts first.
1414
// Choice of either plan, the first set of timers or second set
1515
var source = Rx.Observable.when(
1616
Rx.Observable.timer(200).and(Rx.Observable.timer(300)).thenDo(function (x, y) { return 'first'; }),
17-
Rx.Observable.timer(400).and(Rx.Observable.timer(500)).thenDo(function (x, y) { return 'second'; }),
17+
Rx.Observable.timer(400).and(Rx.Observable.timer(500)).thenDo(function (x, y) { return 'second'; })
1818
);
1919

2020
var subscription = source.subscribe(

doc/api/core/operators/distinct.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var source = Rx.Observable.of(42, 24, 42, 24)
1818

1919
var subscription = source.subscribe(
2020
function (x) {
21-
console.log('Next: %s', x;
21+
console.log('Next: %s', x);
2222
},
2323
function (err) {
2424
console.log('Error: %s', err);
@@ -37,7 +37,7 @@ var source = Rx.Observable.of({value: 42}, {value: 24}, {value: 42}, {value: 24}
3737

3838
var subscription = source.subscribe(
3939
function (x) {
40-
console.log('Next: %s', x;
40+
console.log('Next: %s', x);
4141
},
4242
function (err) {
4343
console.log('Error: %s', err);

doc/api/core/operators/doonerror.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This method can be used for debugging, logging, etc. of query behavior by interc
1616
#### Example
1717
```js
1818
/* Using a function */
19-
var source = Rx.Observable.throw(new Error());
19+
var source = Rx.Observable.throw(new Error())
2020
.doOnError(
2121
function (err) { console.log('Do Error: %s', err); }
2222
);
@@ -37,7 +37,7 @@ var subscription = source.subscribe(
3737

3838
/* Using a thisArg */
3939

40-
var source = Rx.Observable.throw(new Error());
40+
var source = Rx.Observable.throw(new Error())
4141
.doOnError(
4242
function (err) { this.log('Do Error: %s', err); },
4343
console

doc/api/core/operators/fromeventpattern.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var subscription = source.subscribe(
3232
console.log('Next: Clicked!');
3333
},
3434
function (err) {
35-
console.log('Error: %s' err);
35+
console.log('Error: %s', err);
3636
},
3737
function () {
3838
console.log('Completed');

doc/api/core/operators/pairs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var subscription = source.subscribe(
3939
```
4040

4141
ES6 makes for an even nicer experience such as:
42-
```js
42+
```es6
4343
let obj = {
4444
foo: 42,
4545
bar: 56,

doc/api/core/operators/partition.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Returns two observables which partition the observations of the source by the gi
1616
#### Example
1717

1818
An example using ES6 syntax:
19-
```js
19+
```es6
2020
let [odds, evens] = Rx.Observable.range(0, 10)
2121
.partition(x => x % 2 === 0);
2222

doc/api/core/operators/subscribeoncompleted.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var source = Rx.Observable.range(0, 3);
2828
var subscription = source.subscribeOnCompleted(
2929
function (err) {
3030
this.log('Completed');
31-
}}, console);
31+
}, console);
3232

3333
// => Completed
3434
```

doc/api/core/operators/subscribeonerror.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var source = Rx.Observable.throw(new Error());
2828
var subscription = source.subscribeOnError(
2929
function (err) {
3030
this.log('Error: %s', err);
31-
}}, console);
31+
}, console);
3232

3333
// => Error: Error
3434
```

doc/api/core/operators/subscribeonnext.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var source = Rx.Observable.range(0, 3)
3030
var subscription = source.subscribeOnNext(
3131
function (x) {
3232
this.log('Next: %s', x);
33-
}}, console);
33+
}, console);
3434

3535
// => Next: 0
3636
// => Next: 1

doc/api/core/operators/topromise.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Converts an Observable sequence to a ES2015 compliant promise.
1010
*(`Promise`)*: An ES2015 compliant promise which contains the last value from the Observable sequence. If the Observable sequence is in error, then the Promise will be in the rejected stage. If the sequence is empty, the Promise will not resolve.
1111

1212
#### Example
13-
```js
13+
```es6
1414
/* Using normal ES2015 */
1515
let source = Rx.Observable
1616
.just(42)

doc/api/core/operators/zip.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var range = Rx.Observable.range(0, 5);
7171
var source = Observable.zip(
7272
Promise.resolve(0),
7373
Promise.resolve(1),
74-
Rx.Observable.return(2)
74+
Rx.Observable.return(2),
7575
function (s1, s2, s3) {
7676
return s1 + ':' + s2 + ':' + s3;
7777
}

doc/api/testing/testscheduler.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ scheduler.scheduleAbsolute(100, function () {
307307
},
308308
res.onError.bind(res),
309309
res.onCompleted.bind(res)
310-
);
310+
));
311311
});
312312

313313
scheduler.start();

doc/designguidelines/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ Rx.Observable.prototype.map = function (selector, thisArg) {
894894
observer.onError.bind(observer),
895895
observer.onCompleted.bind(observer)
896896
);
897-
};
897+
});
898898
};
899899
```
900900

doc/gettingstarted/errors.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ var source = get('url').retryWhen(
154154
function (attempts) {
155155
return attempts
156156
.zip(Rx.Observable.range(1, 3), function (_, i) { return i })
157-
.flatMap(function (i)) {
157+
.flatMap(function (i) {
158158
console.log('delay retry by ' + i + ' second(s)');
159159
return Rx.Observable.timer(i * 1000);
160160
});

doc/howdoi/angular.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ Using the Reactive Extensions for JavaScript, we can also integrate using the `R
8989
```js
9090
// Query data
9191
var observable = Rx.Observable.fromPromise(
92-
$http(
92+
$http({
9393
method: 'GET',
9494
url: 'someurl',
9595
params: { searchString: $scope.searchString }
96-
)
96+
})
9797
);
9898

9999
// Subscribe to data and update UI

doc/mapping/bacon.js/whyrx.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,12 @@ var results = scheduler.startWithCreate(function () {
239239
// Some custom collection assertion for values
240240
collectionAssert.assertEqual(results.messages, [
241241
Rx.ReactiveTest.onNext(201, 2),
242-
Rx.ReactiveTest.onCompleted(202);
242+
Rx.ReactiveTest.onCompleted(202)
243243
]);
244244

245245
// Some custom collection assertion for subscriptions
246246
collectionAssert.assertEqual(xs.subscriptions, [
247-
Rx.ReactiveTest.subscribe(200, 202);
247+
Rx.ReactiveTest.subscribe(200, 202)
248248
])
249249
```
250250

@@ -264,7 +264,7 @@ getStockData().forEach(function (stock) {
264264
});
265265

266266
// Calculate with the data
267-
source.groupBy(function (stock) { return stock.symbol };)
267+
source.groupBy(function (stock) { return stock.symbol; })
268268
/* Do something with the data */
269269
.subscribe(function (info) {
270270
// Process the data
@@ -279,7 +279,7 @@ In our applications, we consume a lot of data from external sources. But, what
279279

280280
RxJS has a rather large surface area, so we give you the ability to build RxJS with only the things you want and none of the things you don't via the [`rx-cli`](https://www.npmjs.org/package/rx-cli) project. For example, we can build a `compat` version of RxJS with only the `map`, `flatMap`, `takeUntil`, and `fromEvent` methods, which keeps your RxJS version lean and mean.
281281

282-
```js
282+
```bash
283283
rx --lite --compat --methods map,flatmap,takeuntil,fromevent
284284
```
285285

doc/mapping/highland/whyrx.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,12 @@ var results = scheduler.startWithCreate(function () {
232232
// Some custom collection assertion for values
233233
collectionAssert.assertEqual(results.messages, [
234234
Rx.ReactiveTest.onNext(201, 2),
235-
Rx.ReactiveTest.onCompleted(202);
235+
Rx.ReactiveTest.onCompleted(202)
236236
]);
237237

238238
// Some custom collection assertion for subscriptions
239239
collectionAssert.assertEqual(xs.subscriptions, [
240-
Rx.ReactiveTest.subscribe(200, 202);
240+
Rx.ReactiveTest.subscribe(200, 202)
241241
])
242242
```
243243

@@ -257,7 +257,7 @@ getStockData().forEach(function (stock) {
257257
});
258258

259259
// Calculate with the data
260-
source.groupBy(function (stock) { return stock.symbol };)
260+
source.groupBy(function (stock) { return stock.symbol })
261261
/* Do something with the data */
262262
.subscribe(function (info) {
263263
// Process the data
@@ -290,7 +290,7 @@ pauser.resume();
290290

291291
RxJS has a rather large surface area, so we give you the ability to build RxJS with only the things you want and none of the things you don't via the [`rx-cli`](https://www.npmjs.org/package/rx-cli) project. For example, we can build a `compat` version of RxJS with only the `map`, `flatMap`, `takeUntil`, and `fromEvent` methods, which keeps your RxJS version lean and mean.
292292

293-
```js
293+
```bash
294294
rx --lite --compat --methods map,flatmap,takeuntil,fromevent
295295
```
296296

0 commit comments

Comments
 (0)