Parses a query string into an object.

Type signature

(xs?: string) => object

Examples

parse("test&count=5");
// ⇒ { test: true, count: "5" }
Try in REPL

Questions

  • How to parse a query string?

TypeScript sourceJavaScript source