Liking cljdoc? Tell your friends :D
ClojureScript only.

bangmod.router.match

The pure half of URL matching: a URL against a seq of compiled route tables, with the tables passed in. bangmod.router.internal/parse (pushy's matcher) and bangmod.router.core/match-path both delegate here, so a URL resolves the same way for navigation and for a caller asking directly. Free of pushy and reagent, so it loads under :node-test.

The pure half of URL matching: a URL against a seq of compiled route tables, with the
tables passed in. `bangmod.router.internal/parse` (pushy's matcher) and
`bangmod.router.core/match-path` both delegate here, so a URL resolves the same way for
navigation and for a caller asking directly. Free of pushy and reagent, so it loads under
`:node-test`.
raw docstring

match-pathcljs

(match-path tables path)

parse, narrowed to the public contract: {:handler kw :route-params {kw string} :query-params {kw string}}, both maps empty when there are none, no other keys, or nil when no table matches path.

`parse`, narrowed to the public contract: `{:handler kw :route-params {kw string}
:query-params {kw string}}`, both maps empty when there are none, no other keys, or nil
when no table matches `path`.
sourceraw docstring

parsecljs

(parse tables url)

Matches url (a path with an optional query string) against tables, the compiled route tables in registration order. The first table that matches wins. Returns bidi's match merged over {:query-params {kw "v"}}. With no match, :handler is absent but :query-params is still present. This is the shape navigation stores as the matched route.

Matches `url` (a path with an optional query string) against `tables`, the compiled
route tables in registration order. The first table that matches wins. Returns bidi's
match merged over `{:query-params {kw "v"}}`. With no match, `:handler` is absent but
`:query-params` is still present. This is the shape navigation stores as the matched
route.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close