diff options
author | Chocobozzz <me@florianbigard.com> | 2023-03-06 11:39:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-03-07 10:18:32 +0100 |
commit | 9e401fde36bdcb4b5e8dc54262c01f1e660d81a8 (patch) | |
tree | a2a3c115254370048c6dc0178c7ac91b977a3f2d /shared | |
parent | 464e4ed92c119c8f5d8ae561ad1d27a90d2581a0 (diff) | |
download | PeerTube-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.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 | } |