MCPcopy Index your code
hub / github.com/browserless/browserless / queryParamsToObject

Function queryParamsToObject

src/utils.ts:586–596  ·  view source on GitHub ↗
(
  params: URLSearchParams,
)

Source from the content-addressed store, hash-verified

584);
585
586export const queryParamsToObject = (
587 params: URLSearchParams,
588): Record<string, unknown> =>
589 [...params.entries()].reduce(
590 (accum, [key, value]) => {
591 accum[key] =
592 value === '' || value === undefined || value === null ? true : value;
593 return accum;
594 },
595 {} as ReturnType<typeof queryParamsToObject>,
596 );
597
598const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor;
599

Callers 2

handleRequestUnsafeMethod · 0.85
handleWebSocketUnsafeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected