MCPcopy Create free account
hub / github.com/solidjs/solid-router / decodeQueryParamPart

Function decodeQueryParamPart

src/recognizer/index.ts:512–522  ·  view source on GitHub ↗
(part: string)

Source from the content-addressed store, hash-verified

510}
511
512function decodeQueryParamPart(part: string): string {
513 // http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1
514 part = part.replace(/\+/gm, "%20");
515 let result: string;
516 try {
517 result = decodeURIComponent(part);
518 } catch (error) {
519 result = "";
520 }
521 return result;
522}
523
524export class RouteRecognizer<THandler = string> {
525 private rootState: State<THandler>;

Callers 1

parseQueryStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…