diff options
author | Chocobozzz <me@florianbigard.com> | 2023-03-07 10:42:31 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-03-07 10:42:31 +0100 |
commit | d9dbf27a7dacb42e49e21d5691141c2edf885644 (patch) | |
tree | 5f33a1125099b14f94d61091061d8b754a1e4784 /shared | |
parent | 692ae8c31caa5a404142c9f46e03fdc8dc5b233f (diff) | |
parent | a3e5f7e732cca41267314d64307bdcfebd12e7de (diff) | |
download | PeerTube-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.ts | 5 |
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 | ||
44 | function shallowCopy <T> (o: T): T { | ||
45 | return Object.assign(Object.create(Object.getPrototypeOf(o)), o) | ||
46 | } | ||
47 | |||
44 | export { | 48 | export { |
45 | pick, | 49 | pick, |
46 | omit, | 50 | omit, |
47 | getKeys, | 51 | getKeys, |
52 | shallowCopy, | ||
48 | sortObjectComparator | 53 | sortObjectComparator |
49 | } | 54 | } |