Files
start-os/web/projects/shared/src/pipes/empty.pipe.ts
Alex Inkin be921b7865 chore: update packages (#3132)
* chore: update packages

* start tunnel messaging

* chore: standalone

* pbpaste instead

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
2026-03-09 09:53:47 -06:00

12 lines
298 B
TypeScript

import { Pipe, PipeTransform } from '@angular/core'
import { isEmptyObject } from '../util/misc.util'
@Pipe({
name: 'empty',
})
export class EmptyPipe implements PipeTransform {
transform(val: object | [] = {}): boolean {
return Array.isArray(val) ? !val.length : isEmptyObject(val)
}
}