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

@Pipe({
  name: 'truncateText',
})
export class TruncateTextPipe implements PipeTransform {
  transform(text: string, numberOfChars: number): string {
    return text.slice(0, numberOfChars || text.length) + '...';
  }
}
