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

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

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