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

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

All files » src/operator/extended/ » distinctUntilKeyChanged.ts
1 2 3 4 5 6 7 8 9 10 111   1 17 39 16   23      
import {distinctUntilChanged} from '../distinctUntilChanged';
 
export function distinctUntilKeyChanged<T>(key: string, compare?: (x: any, y: any) => boolean, thisArg?: any) {
  return distinctUntilChanged.call(this, function(x, y) {
    if (compare) {
      return compare.call(thisArg, x[key], y[key]);
    }
    return x[key] === y[key];
  });
}