Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

400 B
Raw Blame
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'defaultValue',
  pure: true,
  standalone: true
})
export class DefaultValuePipe implements PipeTransform {

  transform(value: any, replacementString = '—'): string {
    if (value === null || value === undefined || value === '' || value === Infinity || Number.isNaN(value)) return replacementString;
    return value;
  }

}