You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 20, 2018. It is now read-only.
@@ -45,28 +45,28 @@ But the best news of all is that you already know how to program like this. Tak
45
45
var source =getStockData();
46
46
47
47
source
48
-
.filter(function (quote) {
49
-
returnquote.price>30;
48
+
.filter(function (quote) {
49
+
returnquote.price>30;
50
50
})
51
-
.map(function (quote) {
51
+
.map(function (quote) {
52
52
returnquote.price;
53
53
})
54
54
.forEach(function (price) {
55
55
console.log('Prices higher than $30: $'+ price);
56
56
});
57
57
```
58
58
59
-
Now what if this data were to come as some sort of event, for example a stream, such as as a WebSocket, then we could pretty much write the same query to iterate our data, with very litle change.
59
+
Now what if this data were to come as some sort of event, for example a stream, such as as a WebSocket, then we could pretty much write the same query to iterate our data, with very little change.
60
60
61
61
```js
62
62
/* Get stock data somehow */
63
63
var source =getAsyncStockData();
64
64
65
65
var subscription = source
66
-
.filter(function (quote) {
67
-
returnquote.price>30;
66
+
.filter(function (quote) {
67
+
returnquote.price>30;
68
68
})
69
-
.map(function (quote) {
69
+
.map(function (quote) {
70
70
returnquote.price;
71
71
})
72
72
.subscribe(
@@ -81,7 +81,7 @@ var subscription = source
81
81
subscription.dispose();
82
82
```
83
83
84
-
The only difference is that we can handle the errors inline with our subscription. And when we're no longer interested in receiving the data as it comes steraming in, we call `dispose` on our subscription.
84
+
The only difference is that we can handle the errors inline with our subscription. And when we're no longer interested in receiving the data as it comes streaming in, we call `dispose` on our subscription.
85
85
86
86
## Batteries Included ##
87
87
@@ -90,7 +90,7 @@ This set of libraries include:
90
90
-[rx.lite.js](doc/libraries/rx.lite.md) - lite version with event bindings, creation, time and standard query operators with a compat file for older browsers.
91
91
-[rx.js](doc/libraries/rx.md) - core library for ES5 compliant browsers and runtimes plus compatibility for older browsers.
@@ -151,7 +151,7 @@ function searchWikipedia (term) {
151
151
}
152
152
```
153
153
154
-
Once that is created, now we can tie together the distinct throttled input and then query the service. In this case, we'll call `flatMapLatest` to get the value and ensure that we're not introducing any out of order sequence calls.
154
+
Once that is created, now we can tie together the distinct throttled input and then query the service. In this case, we'll call `flatMapLatest` to get the value and ensure that we're not introducing any out of order sequence calls.
155
155
156
156
```js
157
157
var suggestions = distinct
@@ -169,12 +169,12 @@ suggestions.subscribe( function (data) {
0 commit comments