fix: urlencoded form evaluation issues
This commit is contained in:
9
packages/hoppscotch-app/helpers/functional/debug.ts
Normal file
9
packages/hoppscotch-app/helpers/functional/debug.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Logs the current value and returns the same value
|
||||
* @param x The value to log
|
||||
* @returns The parameter `x` passed to this
|
||||
*/
|
||||
export const trace = <T>(x: T) => {
|
||||
console.log(x)
|
||||
return x
|
||||
}
|
||||
7
packages/hoppscotch-app/helpers/functional/record.ts
Normal file
7
packages/hoppscotch-app/helpers/functional/record.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const tupleToRecord = <
|
||||
KeyType extends string | number | symbol,
|
||||
ValueType
|
||||
>(
|
||||
tuples: [KeyType, ValueType][]
|
||||
): Record<KeyType, ValueType> =>
|
||||
(Object.assign as any)(...tuples.map(([key, val]) => ({ [key]: val })))
|
||||
Reference in New Issue
Block a user