fix: params, headers, url encoded syncing issues
This commit is contained in:
10
packages/hoppscotch-app/helpers/functional/object.ts
Normal file
10
packages/hoppscotch-app/helpers/functional/object.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { pipe } from "fp-ts/function"
|
||||
import cloneDeep from "lodash/cloneDeep"
|
||||
|
||||
export const objRemoveKey =
|
||||
<T, K extends keyof T>(key: K) =>
|
||||
(obj: T): Omit<T, K> =>
|
||||
pipe(cloneDeep(obj), (e) => {
|
||||
delete e[key]
|
||||
return e
|
||||
})
|
||||
Reference in New Issue
Block a user