import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'searchText'
})
export class SearchFilterPipe implements PipeTransform {

  transform(items: any[], searchText: string): any[] {
   
    console.log(items)
    if(!items) return [];
    if(!searchText) return items;
  //  searchText = searchText.toLowerCase();
      return items.filter( it => {
       console.log(it);
    //  return it.toLowerCase().includes(searchText);
    });
   }
  

}
