From 955464fdca31cbb775fc43316a4dcdf26da6d00d Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 11 Nov 2019 13:27:18 +0000 Subject: [PATCH] [Library]: Add copy function on HelperFunctions git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57573 d315682c-612b-4755-9ff5-7f18f6832af3 --- utils/HelperFunctions.class.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/HelperFunctions.class.ts b/utils/HelperFunctions.class.ts index 9ebcb542..6d663475 100644 --- a/utils/HelperFunctions.class.ts +++ b/utils/HelperFunctions.class.ts @@ -12,4 +12,8 @@ export class HelperFunctions { public static isTiny(url: string) { return (url.indexOf('tinyurl.com') !== -1); } + + public static copy(element: any): any { + return JSON.parse(JSON.stringify(element)); + } }