aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-03-06 11:39:23 +0100
committerChocobozzz <me@florianbigard.com>2023-03-07 10:18:32 +0100
commit9e401fde36bdcb4b5e8dc54262c01f1e660d81a8 (patch)
treea2a3c115254370048c6dc0178c7ac91b977a3f2d /shared
parent464e4ed92c119c8f5d8ae561ad1d27a90d2581a0 (diff)
downloadPeerTube-9e401fde36bdcb4b5e8dc54262c01f1e660d81a8.tar.gz
PeerTube-9e401fde36bdcb4b5e8dc54262c01f1e660d81a8.tar.zst
PeerTube-9e401fde36bdcb4b5e8dc54262c01f1e660d81a8.zip
Refactor my actor avatar edit
Diffstat (limited to 'shared')
-rw-r--r--shared/core-utils/common/object.ts5
1 files changed, 5 insertions, 0 deletions
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') {
41 } 41 }
42} 42}
43 43
44function shallowCopy <T> (o: T): T {
45 return Object.assign(Object.create(Object.getPrototypeOf(o)), o)
46}
47
44export { 48export {
45 pick, 49 pick,
46 omit, 50 omit,
47 getKeys, 51 getKeys,
52 shallowCopy,
48 sortObjectComparator 53 sortObjectComparator
49} 54}