import { Pipe , PipeTransform } from '@angular/core' ; import { FuseUtils } from '@fuse/utils' ; @ Pipe ( { name : 'filter' } ) export class FilterPipe implements PipeTransform { param { any [ ] } mainArr param { string } searchText param { string } property returns { any } transform ( mainArr , searchText , property ) { return FuseUtils . filterArrayByString ( mainArr , searchText ) ; } }