Revision 57643
Added by Konstantinos Triantafyllou almost 5 years ago
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
[Library]: Change copy method