From 9e401fde36bdcb4b5e8dc54262c01f1e660d81a8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 6 Mar 2023 11:39:23 +0100 Subject: Refactor my actor avatar edit --- shared/core-utils/common/object.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shared') diff --git a/shared/core-utils/common/object.ts b/shared/core-utils/common/object.ts index 2330c9403..7f1f147f4 100644 --- a/shared/core-utils/common/object.ts +++ b/shared/core-utils/common/object.ts @@ -41,9 +41,14 @@ function sortObjectComparator (key: string, order: 'asc' | 'desc') { } } +function shallowCopy (o: T): T { + return Object.assign(Object.create(Object.getPrototypeOf(o)), o) +} + export { pick, omit, getKeys, + shallowCopy, sortObjectComparator } -- cgit v1.2.3