aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-03-07 10:42:31 +0100
committerChocobozzz <me@florianbigard.com>2023-03-07 10:42:31 +0100
commitd9dbf27a7dacb42e49e21d5691141c2edf885644 (patch)
tree5f33a1125099b14f94d61091061d8b754a1e4784 /shared
parent692ae8c31caa5a404142c9f46e03fdc8dc5b233f (diff)
parenta3e5f7e732cca41267314d64307bdcfebd12e7de (diff)
downloadPeerTube-d9dbf27a7dacb42e49e21d5691141c2edf885644.tar.gz
PeerTube-d9dbf27a7dacb42e49e21d5691141c2edf885644.tar.zst
PeerTube-d9dbf27a7dacb42e49e21d5691141c2edf885644.zip
Merge branch 'release/5.1.0' into develop
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}