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

@Pipe({
    name: 'filter'
})

export class FilterSearch implements PipeTransform {
    transform(items: any[], search: string) {
        const contains = new RegExp(search, 'i');
        return (items as any[]).filter(item => contains.test(item.path));
    }
}

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

@Pipe({
    name: 'filter'
})

export class FilterSearch implements PipeTransform {
    transform(items: any[], search: string) {
        const contains = new RegExp(search, 'i');
        return (items).filter(item => contains.test(item.path));
    }
}

Revert "fix matching search with menuitems"
Revert "fix matching search with menuitems"

This reverts commit 593c66d4b600f7dba88c3380fc337f5f9e516b6b.
