UNPKG

@anglr/grid

Version:
27 lines 1.3 kB
import { Pipe } from '@angular/core'; import { getValue } from '@jscrpt/common'; import * as i0 from "@angular/core"; /** * Reads value from object and returns it, can address nested objects using '.' notation */ export class ReadValuePipe { //######################### public methods - implementation of PipeTransform ######################### /** * Reads value from object and returns it, can address nested objects using '.' notation * @param value - Object storing requested value * @param path - Path to property which value should be obtained */ transform(value, path) { if (!path) { return ''; } return getValue(value, path); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ReadValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); } static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.0", ngImport: i0, type: ReadValuePipe, isStandalone: true, name: "readValue" }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ReadValuePipe, decorators: [{ type: Pipe, args: [{ name: 'readValue' }] }] }); //# sourceMappingURL=readValue.pipe.js.map