MCPcopy Index your code
hub / github.com/Effect-TS/effect / normalizeUrlParams

Function normalizeUrlParams

packages/platform/src/HttpApiBuilder.ts:632–642  ·  view source on GitHub ↗
(
  params: ReadonlyRecord<string, string | Array<string>>,
  ast: AST.AST
)

Source from the content-addressed store, hash-verified

630 * @internal
631 */
632export function normalizeUrlParams(
633 params: ReadonlyRecord<string, string | Array<string>>,
634 ast: AST.AST
635): ReadonlyRecord<string, string | Array<string>> {
636 const out: Record<string, string | Array<string>> = {}
637 for (const key in params) {
638 const value = params[key]
639 out[key] = Array.isArray(value) || isSingleStringType(ast, key) ? value : [value]
640 }
641 return out
642}
643
644const handlerToRoute = (
645 endpoint_: HttpApiEndpoint.HttpApiEndpoint.Any,

Callers 1

handlerToRouteFunction · 0.85

Calls 1

isSingleStringTypeFunction · 0.85

Tested by

no test coverage detected