mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-17 23:47:12 +00:00
* chore: arrow-body-style func-style is added in the rule * fix: linting issues fixed Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
15 lines
291 B
TypeScript
15 lines
291 B
TypeScript
const convertObjectIntoParams = (
|
|
props: Record<string, unknown>,
|
|
stringify = false,
|
|
): string =>
|
|
Object.keys(props)
|
|
.map(
|
|
(e) =>
|
|
`${e}=${
|
|
stringify ? encodeURIComponent(JSON.stringify(props[e])) : props[e]
|
|
}`,
|
|
)
|
|
.join('&');
|
|
|
|
export default convertObjectIntoParams;
|