mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
health page, manifest page, watch unauth, begin redesign
This commit is contained in:
committed by
Aiden McClelland
parent
7013364ae8
commit
5d24d9324c
@@ -5,7 +5,8 @@ import { isEmptyObject } from '../util/misc.util'
|
||||
name: 'empty',
|
||||
})
|
||||
export class EmptyPipe implements PipeTransform {
|
||||
transform (obj: { }): boolean {
|
||||
return isEmptyObject(obj)
|
||||
transform (val: object | [] = { }): boolean {
|
||||
if (Array.isArray(val)) return !val.length
|
||||
return isEmptyObject(val)
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,12 @@ import { Pipe, PipeTransform } from '@angular/core'
|
||||
})
|
||||
export class TypeofPipe implements PipeTransform {
|
||||
transform (value: any): any {
|
||||
if (value === null) {
|
||||
return 'null'
|
||||
} else if (Array.isArray(value)) {
|
||||
return 'array'
|
||||
}
|
||||
|
||||
return typeof value
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user