DM
Size: a a a
DM
DM
VZ
VZ
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'highlight'
})
export class HighlightPipe implements PipeTransform {
transform(value: string, args?: string): string {
if (value && args) {
const regexp = new RegExp(`\\b(?=\\w)${args.trim()}`, 'gi');
return value.replace(regexp, match => `<mark>${match}</mark>`);
}
return value;
}
}VZ
DM
DM
DG
OV
DG
DG
VS
DG
VS
DM

DM
V
V