Remove 'unfreeze'
This commit is contained in:
parent
3692cc41c8
commit
d93439d911
3 changed files with 1 additions and 8 deletions
|
|
@ -71,7 +71,7 @@ export const createVendettaObject = (unloads: any[]): any => ({
|
|||
findInReactTree: (tree: { [key: string]: any; }, filter: any) => utils.findInReactTree(tree, filter),
|
||||
findInTree: (tree: any, filter: any, options: any) => utils.findInTree(tree, filter, options),
|
||||
safeFetch: (input: RequestInfo | URL, options?: RequestInit | undefined, timeout?: number | undefined) => utils.safeFetch(input, options, timeout),
|
||||
unfreeze: (obj: object) => utils.unfreeze(obj),
|
||||
unfreeze: (obj: object) => ({ ...obj }),
|
||||
without: (object: any, ...keys: any) => utils.without(object, ...keys)
|
||||
},
|
||||
debug: {
|
||||
|
|
|
|||
|
|
@ -7,5 +7,4 @@ export { findInTree } from "@lib/utils/findInTree";
|
|||
export * as logger from "@lib/utils/logger";
|
||||
export { safeFetch } from "@lib/utils/safeFetch";
|
||||
export * as types from "@lib/utils/types";
|
||||
export { unfreeze } from "@lib/utils/unfreeze";
|
||||
export { without } from "@lib/utils/without";
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
// https://stackoverflow.com/a/68339174
|
||||
|
||||
export function unfreeze(obj: object) {
|
||||
if (Object.isFrozen(obj)) return Object.assign({}, obj);
|
||||
return obj;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue