(match-beginning regex-pattern env)
Match the beginning of the :remainder value in m. If matched, update the :remainder value in m with the path that remains after matching.
Match the beginning of the :remainder value in m. If matched, update the :remainder value in m with the path that remains after matching.
(match-pair [pattern matched] orig-env)
A pair contains a pattern to match (either fully or partially) and an expression yielding a handler. The second parameter is a map containing state, including the remaining path.
A pair contains a pattern to match (either fully or partially) and an expression yielding a handler. The second parameter is a map containing state, including the remaining path.
(match-route route path & {:as options})
Given a route definition data structure and a path, return the handler, if any, that matches the path.
Given a route definition data structure and a path, return the handler, if any, that matches the path.
(resolve-handler _ m)
(unresolve-handler _ m)
(matches _)
A protocol used in the expansion of possible matches that the pattern can match. This is used to gather all possible routes using route-seq below.
A protocol used in the expansion of possible matches that the pattern can match. This is used to gather all possible routes using route-seq below.
(path-for route handler & {:as params})
Given a route definition data structure, a handler and an option map, return a path that would route to the handler. The map must contain the values to any parameters required to create the path, and extra values are silently ignored.
Given a route definition data structure, a handler and an option map, return a path that would route to the handler. The map must contain the values to any parameters required to create the path, and extra values are silently ignored.
(match-pattern _ env)
Return a new state if this pattern matches the given state, or falsy otherwise. If a new state is returned it will usually have the rest of the path to match in the :remainder entry.
Return a new state if this pattern matches the given state, or falsy otherwise. If a new state is returned it will usually have the rest of the path to match in the :remainder entry.
(unmatch-pattern _ m)
(transform-param _)
(unmatch-segment _ params)
(segment-regex-group _)
(param-key _)
(matches? _ s)
(routes _)
Provide a bidi route structure. Returns a vector pair, the first element is the pattern, the second element is the matched route or routes.
Provide a bidi route structure. Returns a vector pair, the first element is the pattern, the second element is the matched route or routes.
(routes-context routes context)
Wrap a Matched such that a successful match will merge the given context with the match-context. The merge is such that where there is a conflict, the inner sub-tree overrides the outer container.
Wrap a Matched such that a successful match will merge the given context with the match-context. The merge is such that where there is a conflict, the inner sub-tree overrides the outer container.
(gather _ context)
Return a sequence of leaves
Return a sequence of leaves
(uuid s)
Function for creating a UUID of the appropriate type for the platform. Note that this function should only be used in route patterns as, at least in the case of ClojureScript, it does not validate that the input string is actually a valid UUID (this is handled by the route matching logic).
Function for creating a UUID of the appropriate type for the platform. Note that this function should _only_ be used in route patterns as, at least in the case of ClojureScript, it does not validate that the input string is actually a valid UUID (this is handled by the route matching logic).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close