1
0
Fork 0
peertube/client/src/root-helpers/utils.ts

13 lines
246 B
TypeScript

function objectToUrlEncoded (obj: any) {
const str: string[] = []
for (const key of Object.keys(obj)) {
str.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))
}
return str.join('&')
}
export {
objectToUrlEncoded
}