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

Commit a737a61

Browse files
Merge pull request #496 from 38elements/master
Update document
2 parents 05efce1 + e4c3a5e commit a737a61

22 files changed

Lines changed: 35 additions & 35 deletions

doc/api/core/notification.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Creates an object that represents an OnCompleted notification to an observer.
3030
#### Example
3131
```js
3232
var source = Rx.Observable
33-
.fromArray([
33+
.from([
3434
Rx.Notification.createOnCompleted()
3535
])
3636
.dematerialize();
@@ -69,7 +69,7 @@ Creates an object that represents an OnError notification to an observer.
6969
#### Example
7070
```js
7171
var source = Rx.Observable
72-
.fromArray([
72+
.from([
7373
Rx.Notification.createOnError(new Error('woops'))
7474
])
7575
.dematerialize();
@@ -108,7 +108,7 @@ Creates an object that represents an OnNext notification to an observer.
108108
#### Example
109109
```js
110110
var source = Rx.Observable
111-
.fromArray([
111+
.from([
112112
Rx.Notification.createOnNext(42),
113113
Rx.Notification.createOnCompleted()
114114
])

doc/api/core/observable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ The Observer and Observable interfaces provide a generalized mechanism for push-
1818
- [`for | forIn`](operators/for.md)
1919
- [`forkJoin`](operators/forkjoin.md)
2020
- [`from`](operators/from.md)
21-
- [`fromArray`](operators/fromarray.md)
2221
- [`fromCallback`](operators/fromcallback.md)
2322
- [`fromEvent`](operators/fromevent.md)
2423
- [`fromEventPattern`](operators/fromeventpattern.md)
@@ -199,6 +198,7 @@ The Observer and Observable interfaces provide a generalized mechanism for push-
199198

200199
## `Deprecated Observable Methods` ##
201200
- [`catchException`](operators/catch.md)
201+
- [`fromArray`](operators/fromarray.md)
202202
- [`returnValue`](operators/return.md)
203203
- [`throwException`](operators/throw.md)
204204

doc/api/core/operators/average.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var arr = [
3535
{ value: 3 }
3636
];
3737

38-
var source = Rx.Observable.fromArray(arr).average(function (x) {
38+
var source = Rx.Observable.from(arr).average(function (x) {
3939
return x.value;
4040
});
4141

doc/api/core/operators/debounce.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### `Rx.Observable.prototype.debounce(dueTime, [scheduler])` ###
22
### `Rx.Observable.prototype.throttleWithTimeout(dueTime, [scheduler])` ###
33
### `Rx.Observable.prototype.throttle(dueTime, [scheduler])` **DEPRECATED** ###
4-
[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/throttle.js "View in source")
4+
[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/debounce.js "View in source")
55

66
Emits an item from the source Observable after a particular timespan has passed without the Observable emitting any other items.
77

doc/api/core/operators/dematerialize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Dematerializes the explicit notification values of an observable sequence as imp
99
#### Example
1010
```js
1111
var source = Rx.Observable
12-
.fromArray([
12+
.from([
1313
Rx.Notification.createOnNext(42),
1414
Rx.Notification.createOnError(new Error('woops'))
1515
])

doc/api/core/operators/distinct.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Returns an observable sequence that contains only distinct elements according to
1313
#### Example
1414
```js
1515
/* Without key selector */
16-
var source = Rx.Observable.fromArray([
16+
var source = Rx.Observable.from([
1717
42, 24, 42, 24
1818
])
1919
.distinct();
@@ -34,7 +34,7 @@ var subscription = source.subscribe(
3434
// => Completed
3535

3636
/* With key selector */
37-
var source = Rx.Observable.fromArray([
37+
var source = Rx.Observable.from([
3838
{value: 42}, {value: 24}, {value: 42}, {value: 24}
3939
])
4040
.distinct(function (x) { return x.value; });

doc/api/core/operators/distinctuntilchanged.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Returns an observable sequence that contains only distinct contiguous elements a
1313
#### Example
1414
```js
1515
/* Without key selector */
16-
var source = Rx.Observable.fromArray([
16+
var source = Rx.Observable.from([
1717
42, 42, 24, 24
1818
])
1919
.distinctUntilChanged();
@@ -34,7 +34,7 @@ var subscription = source.subscribe(
3434
// => Completed
3535

3636
/* With key selector */
37-
var source = Rx.Observable.fromArray([
37+
var source = Rx.Observable.from([
3838
{value: 42}, {value: 42}, {value: 24}, {value: 24}
3939
])
4040
.distinctUntilChanged(function (x) { return x.value; });

doc/api/core/operators/elementat.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Returns the element at a specified index in a sequence.
1212
#### Example
1313
```js
1414
/* Finds an index */
15-
var source = Rx.Observable.fromArray([1,2,3,4])
15+
var source = Rx.Observable.from([1,2,3,4])
1616
.elementAt(1);
1717

1818
var subscription = source.subscribe(
@@ -30,7 +30,7 @@ var subscription = source.subscribe(
3030
// => Completed
3131

3232
/* Not found */
33-
var source = Rx.Observable.fromArray([1,2,3,4])
33+
var source = Rx.Observable.from([1,2,3,4])
3434
.elementAt(4);
3535

3636
var subscription = source.subscribe(

doc/api/core/operators/elementatordefault.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Returns the element at a specified index in a sequence.
1313
#### Example
1414
```js
1515
/* Finds an index */
16-
var source = Rx.Observable.fromArray([1,2,3,4])
17-
.elementAt(1);
16+
var source = Rx.Observable.from([1,2,3,4])
17+
.elementAtOrDefault(1);
1818

1919
var subscription = source.subscribe(
2020
function (x) {
@@ -31,8 +31,8 @@ var subscription = source.subscribe(
3131
// => Completed
3232

3333
/* Not found */
34-
var source = Rx.Observable.fromArray([1,2,3,4])
35-
.elementAt(4, 0);
34+
var source = Rx.Observable.from([1,2,3,4])
35+
.elementAtOrDefault(4, 0);
3636

3737
var subscription = source.subscribe(
3838
function (x) {

doc/api/core/operators/find.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Searches for an element that matches the conditions defined by the specified pre
1717
/* Found an element */
1818
var array = [1,2,3,4];
1919

20-
var source = Rx.Observable.fromArray(array)
20+
var source = Rx.Observable.from(array)
2121
.find(function (x, i, obs) {
2222
return x === 1;
2323
});
@@ -39,7 +39,7 @@ var subscription = source.subscribe(
3939
/* Not found */
4040
var array = [1,2,3,4];
4141

42-
var source = Rx.Observable.fromArray(array)
42+
var source = Rx.Observable.from(array)
4343
.find(function (x, i, obs) {
4444
return x === 5;
4545
});

0 commit comments

Comments
 (0)