aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/misc/object-length.pipe.ts
blob: 84d182052f29b56ca3589cf3f3508ff32162126b (plain) (blame)
1
2
3
4
5
6
7
8
import { Pipe, PipeTransform } from '@angular/core'

@Pipe({ name: 'myObjectLength' })
export class ObjectLengthPipe implements PipeTransform {
  transform (value: Object) {
    return Object.keys(value).length
  }
}