mirror of
https://github.com/clearml/clearml-web
synced 2025-06-26 18:27:02 +00:00
16 lines
285 B
TypeScript
16 lines
285 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
|
|
@Pipe({
|
|
name: 'initials'
|
|
})
|
|
export class InitialsPipe implements PipeTransform {
|
|
|
|
transform(value: string) {
|
|
if (value !== null) {
|
|
return value.split(' ').map(part => part[0]).join('');
|
|
}
|
|
return value;
|
|
}
|
|
|
|
}
|