Fixed issue #1 and some other fixes

This commit is contained in:
lotte
2018-07-30 10:19:45 +02:00
parent 1ab53e7204
commit 3fa70523ea
55 changed files with 450 additions and 135 deletions

View File

@@ -1,7 +1,15 @@
import { PipeTransform, Pipe } from '@angular/core';
@Pipe({name: 'dsObjectKeys'})
/**
* Pipe for parsing all keys of an object to an array of key-value pairs
*/
export class ObjectKeysPipe implements PipeTransform {
/**
* @param value An object
* @returns {any} Array with all keys the input object
*/
transform(value, args:string[]): any {
const keys = [];
Object.keys(value).forEach((k) => keys.push(k));