16 lines
352 B
TypeScript
16 lines
352 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
|
|
@Pipe({
|
|
name: 'formatNumbers',
|
|
standalone: true,
|
|
})
|
|
export class FormatNumbersPipe implements PipeTransform {
|
|
transform(values: (string | number)[]): string {
|
|
if (!values || !Array.isArray(values)) {
|
|
return '';
|
|
}
|
|
|
|
return values.map((val) => val.toString()).join(',');
|
|
}
|
|
}
|