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

@Pipe({
  name: 'decimalSeparator',
})
export class DecimalSeparatorPipe implements PipeTransform {
  transform(input: number, replacement: string): string {
    if (!replacement) {
      return input.toString();
    }

    return input.toString().replace('.', replacement);
  }
}
