Files
dspace-angular/src/app/shared/utils/has-no-value.pipe.ts
Yury Bondarenko 5edc689bc1 Fix null/undefined incosistencies
- Introduced pipes for combined null/undefined checks: dsHasValue & dsHasNoValue
- Safer to async !== true than async === false
- Went over other instances of async === to confirm that they should be fine
2024-03-07 09:55:36 +01:00

17 lines
328 B
TypeScript

import {
Pipe,
PipeTransform,
} from '@angular/core';
import { hasNoValue } from '../empty.util';
/**
* Returns true if the passed value is null or undefined.
*/
@Pipe({ name: 'dsHasNoValue' })
export class HasNoValuePipe implements PipeTransform {
transform(value: any): boolean {
return hasNoValue(value);
}
}