This is RxJS v 4. Find the latest version here
Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend.
[scheduler]
(Scheduler
): Scheduler to execute the function.args
(arguments): Values to prepend to the observable sequence.
(Observable
): The source sequence prepended with the specified values.
var source = Rx.Observable.return(4)
.startWith(1, 2, 3)
var subscription = source.subscribe(
function (x) {
console.log('Next: ' + x);
},
function (err) {
console.log('Error: ' + err);
},
function () {
console.log('Completed');
});
// => Next: 1
// => Next: 2
// => Next: 3
// => Next: 4
// => Completed
File:
Dist:
Prerequisites:
- None
NPM Packages:
NuGet Packages:
Unit Tests: