Liking cljdoc? Tell your friends :D

barebuild.utils.url

The URL projection: how a resource reads its query out of the address bar and writes it back, scoped so several resources can share one URL without colliding.

The URL projection: how a resource reads its query out of the address bar and writes it back,
scoped so several resources can share one URL without colliding.
raw docstring

build-scoped-urlcljs

(build-scoped-url search pathname params-by-id)

The url built from each resource's params in params-by-id, scoped by its resource-id. A named resource owns <id>.-prefixed keys (e.g. tasks.sort=start), an unnamed (blank id) resource owns the bare keys and writes them without a prefix (sort=start). Key order follows the url it starts from, unlike query/->query-string, which sorts.

The url built from each resource's params in `params-by-id`, scoped by its resource-id. A named
resource owns `<id>.`-prefixed keys (e.g. tasks.sort=start), an unnamed (blank id) resource owns
the bare keys and writes them without a prefix (sort=start). Key order follows the url it starts
from, unlike `query/->query-string`, which sorts.
sourceraw docstring

owned-url-keyscljs

(owned-url-keys resource-id all-keys)

The keys in all-keys a resource owns: its <id>.-prefixed keys when named, or the bare undotted keys when unnamed (blank id). The two never overlap, so a root resource and named siblings share one URL without colliding.

The keys in `all-keys` a resource owns: its `<id>.`-prefixed keys when named, or the bare
undotted keys when unnamed (blank id). The two never overlap, so a root resource and named
siblings share one URL without colliding.
sourceraw docstring

parse-scoped-querycljs

(parse-scoped-query search resource-id)

The query a resource owns in search: its <id>.-prefixed keys with the prefix stripped, or the bare undotted keys when unnamed, in the query's normal form. It reads a search string, so it inverts the query build-scoped-url writes rather than that function's return value, which carries the pathname too.

The query a resource owns in `search`: its `<id>.`-prefixed keys with the prefix stripped, or
the bare undotted keys when unnamed, in the query's normal form. It reads a search string, so it
inverts the query `build-scoped-url` writes rather than that function's return value, which
carries the pathname too.
sourceraw docstring

url-prefixcljs

(url-prefix resource-id)

The URL key prefix for a resource id: <id>. for a named resource, or "" for the unnamed root resource, whose keys are bare.

The URL key prefix for a resource id: `<id>.` for a named resource, or "" for the unnamed
root resource, whose keys are bare.
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