Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit f5b6e86

Browse files
Merge pull request #1131 from Lakerfield/master
Fix code in Your Own Operators documentation
2 parents 328260a + 3fa50c3 commit f5b6e86

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

doc/gettingstarted/operators.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ You can extend RxJS by adding new operators for operations that are not provided
66

77
RxJS offers a full set of operators that cover most of the possible operations on a set of entities. However, you might need an operator to add a particular semantic meaning to your query—especially if you can reuse that same operator several times in your code. Adding new operators to RxJS is a way to extend its capabilities. However, you can also improve code readability by wrapping existing operators into more specialized and meaningful ones.
88

9-
For example, let's see how we might implement the [_.where](http://lodash.com/docs#where) method from [Lo-Dash](http://lodash.com/) or [Underscore](http://underscorejs.org/), which takes a set of attributes and does a deep comparison for equality. We might try implementing this from scratch using the `Rx.Observable.createWithDisposable` method such as the following code.
9+
For example, let's see how we might implement the [_.where](http://lodash.com/docs#where) method from [Lo-Dash](http://lodash.com/) or [Underscore](http://underscorejs.org/), which takes a set of attributes and does a deep comparison for equality. We might try implementing this from scratch using the `Rx.Observable.create` method such as the following code.
1010

1111
```js
12-
Rx.Observable.prototype.whereProperties = function (properties) {
12+
Rx.Observable.prototype.filterByProperties = function (properties) {
1313
var source = this,
1414
comparer = Rx.internals.isEqual;
1515

16-
return Rx.Observable.filterByProperties(function (observer) {
16+
return Rx.Observable.create(function (observer) {
1717
// Our disposable is the subscription from the parent
1818
return source.subscribe(
1919
function (data) {

0 commit comments

Comments
 (0)