Revision 57643
Added by Konstantinos Triantafyllou over 4 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/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