diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/helpers.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/helpers.ts b/src/util/helpers.ts index 130dcdaef..0e19d7aba 100644 --- a/src/util/helpers.ts +++ b/src/util/helpers.ts @@ -102,6 +102,11 @@ export function deepEquals(x: any, y: any): boolean { ); } +export function deepCopy(x: any): any { + // FIXME: this has many issues ... + return JSON.parse(JSON.stringify(x)); +} + /** * Map from a collection to a list or results and then * concatenate the results. |