(non-empty-string? value)True when value is a string with at least one character.
True when value is a string with at least one character.
(parse-bool-attr s)An attribute that says true or false with no default of its own: false when absent or
"false" in any case. For an attribute that is off by default use parse-bool-present.
An attribute that says true or false with no default of its own: false when absent or `"false"` in any case. For an attribute that is off by default use `parse-bool-present`.
(parse-bool-default-true s)An attribute that is on by default: true when absent, false only for the text "false"
in any case. Pass the value of getAttribute.
An attribute that is on by default: true when absent, false only for the text `"false"` in any case. Pass the value of `getAttribute`.
(parse-bool-present s)An attribute that is off by default, read as HTML does: true when present, whatever its text.
Pass the value of getAttribute.
An attribute that is off by default, read as HTML does: true when present, whatever its text. Pass the value of `getAttribute`.
(safe-url? url)Returns true when url uses an allowed protocol or is a relative URL.
Returns true when url uses an allowed protocol or is a relative URL.
(sanitize-svg-path-d s)Strips characters that are not valid in an SVG path d-attribute. Returns nil if the result is blank.
Strips characters that are not valid in an SVG path d-attribute. Returns nil if the result is blank.
(sanitize-url url)Returns the url unchanged when safe-url? accepts it; otherwise the
empty string. Note: nil and the empty string both round-trip to "",
so callers cannot use the return value to distinguish "missing url"
from "unsafe url" — guard with safe-url? directly when that
distinction matters.
Returns the url unchanged when `safe-url?` accepts it; otherwise the empty string. Note: nil and the empty string both round-trip to `""`, so callers cannot use the return value to distinguish "missing url" from "unsafe url" — guard with `safe-url?` directly when that distinction matters.
(unique-keys identities)A key for each of identities, in order: the identity as text, and how many equal ones come
before it. Equal identities so get different keys.
A key for each of `identities`, in order: the identity as text, and how many equal ones come before it. Equal identities so get different keys.
(with-unique-keys identity-of items)The maps items, each with a :key made of what identity-of gives for it.
The maps `items`, each with a `:key` made of what `identity-of` gives for it.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |