Returns the elements in an observable sequence with the minimum key value according to the specified comparer.
keySelector
(Function
): Key selector function.[comparer]
(Function
): Comparer used to compare elements.
(Observable
): An observable sequence containing a list of zero or more elements that have a minimum key value.
/* Without comparer */
var source = Rx.Observable.from([1,3,5,7,9,2,4,6,8,1])
.minBy(function (x) { return x; });
var subscription = source.subscribe(
function (x) {
console.log('Next: ' + x);
},
function (err) {
console.log('Error: ' + err);
},
function () {
console.log('Completed');
});
// => Next: 1,1
// => Completed
File:
Dist:
Prerequisites:
NPM Packages:
NuGet Packages:
Unit Tests: