Code coverage report for cjs/operator/min.js

Statements: 100% (6 / 6)      Branches: 100% (4 / 4)      Functions: 100% (2 / 2)      Lines: 100% (6 / 6)      Ignored: none     

All files » cjs/operator/ » min.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 181                   1 22   10012 22   1  
var reduce_1 = require('./reduce');
/**
 * The Min operator operates on an Observable that emits numbers (or items that can be evaluated as numbers),
 * and when source Observable completes it emits a single item: the item with the smallest number.
 *
 * <img src="./img/min.png" width="100%">
 *
 * @param {Function} optional comparer function that it will use instead of its default to compare the value of two items.
 * @returns {Observable<R>} an Observable that emits item with the smallest number.
 */
function min(comparer) {
    var min = (typeof comparer === 'function')
        ? comparer
        : function (x, y) { return x < y ? x : y; };
    return this.lift(new reduce_1.ReduceOperator(min));
}
exports.min = min;
//# sourceMappingURL=min.js.map