import { Injectable } from '@angular/core' ; import { Observable } from 'rxjs' ; import { map } from 'rxjs/operators' ; import { snapshotToValue } from './rx/snapshotToValue' ; import { DbRefBuilder } from './firebase/db-ref-builder' ; @ Injectable ( ) export class DockerImageService { constructor ( private db ) { } getDockerImages ( ) { return this . db . dockerImagesRef ( ) . onceValue ( ) . pipe ( snapshotToValue , map ( ( data ) => Object . keys ( data ) . map ( id => data [ id ] ) ) ) ; } }