Project

General

Profile

« Previous | Next » 

Revision 57643

[Library]: Change copy method

View differences:

HelperFunctions.class.ts
14 14
  }
15 15

  
16 16
  public static copy(element: any): any {
17
    return JSON.parse(JSON.stringify(element));
17
    // return JSON.parse(JSON.stringify(element));
18
    // return { ...element};
19
    return Object.assign(Object.create(element), element);
18 20
  }
19 21

  
20 22
  public static encodeArray(elements: string[]): string[] {

Also available in: Unified diff