All files SelectPipe.ts

100% Statements 9/9
85.71% Branches 6/7
100% Functions 2/2
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 133x         3x 5x 5x 4x     3x  
import {Pipe, PipeTransform} from '@angular/core';
 
@Pipe({
  name: 'select',
})
export class SelectPipe implements PipeTransform {
  public transform(obj: any, Iname: string = '') {
    if (name !== '') {
      return obj && obj.data && obj.data[name];
    }
  }
}