import { Pipe , PipeTransform } from '@angular/core' ; import { CmdbType } from '../../framework/models/cmdb-type' ; @ Pipe ( { name : 'typeFilter' } ) export class TypeFilterPipe implements PipeTransform { /**
     * Filter the CmdbTypes structure by label
     * Letters will be transformed to lowercase.
     */ transform ( typeList , label ) { return typeList . filter ( node => node . label . toLowerCase ( ) . includes ( label . toLowerCase ( ) ) ) ; } }