diff options
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 | } |