Liking cljdoc? Tell your friends :D

hyper.utils

General-purpose utility functions.

General-purpose utility functions.
raw docstring

build-urlclj

(build-url path query-params)

Build a URL string from a path and query params map. Omits query params with nil values. Returns path if no query params remain.

Build a URL string from a path and query params map.
Omits query params with nil values.
Returns path if no query params remain.
sourceraw docstring

escape-js-stringclj

(escape-js-string s)

Escape a string for safe embedding in a single-quoted JavaScript string literal inside a <script> block. Handles backslashes, quotes, newlines, line/paragraph separators, and </script> injection.

Escape a string for safe embedding in a single-quoted JavaScript string literal
inside a <script> block. Handles backslashes, quotes, newlines, line/paragraph
separators, and </script> injection.
sourceraw docstring

parse-query-stringclj

(parse-query-string query-string)

Parse a query string into a keyword-keyed map with URL-decoded values. Returns nil if query-string is nil.

Parse a query string into a keyword-keyed map with URL-decoded values.
Returns nil if query-string is nil.
sourceraw docstring

warn-on-access-mapclj

(warn-on-access-map m)

Wrap a map so that accessing any key not present in the map returns nil and logs a warning. Used for SSE re-render requests where HTTP context is unavailable — the warning alerts developers to use middleware + cursors for data that must survive re-renders.

Wrap a map so that accessing any key not present in the map returns
nil and logs a warning.  Used for SSE re-render requests where HTTP
context is unavailable — the warning alerts developers to use
middleware + cursors for data that must survive re-renders.
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