Code coverage report for src/operator/extended/min.ts

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

All files » src/operator/extended/ » min.ts
1 2 3 4 5 6 7 8 9 10  1   1 21   10012 21    
import {Observable} from '../../Observable';
import {ReduceOperator} from '../reduce-support';
 
export function min<T, R>(comparer?: (x: R, y: T) => R): Observable<R> {
  const min = (typeof comparer === 'function')
    ? comparer
    : (x, y) => x < y ? x : y;
  return this.lift(new ReduceOperator(min));
}