Liking cljdoc? Tell your friends :D

sturdy.malli-firewall.transform


smart-key-transformerclj

(smart-key-transformer {:keys [strip-unknown-keys?]
                        :or {strip-unknown-keys? true}})

Malli transformer that selectively keywordizes map keys. It interns only strings that exactly match schema keys. Near-miss strings are retained as strings so Malli can provide spelling suggestions.

If :strip-unknown-keys? is truthy, all other keys are dropped. Otherwise, unknown keys are retained as strings, even if they were originally keywords.

Prevents memory exhaustion (DoS) from arbitrary keyword interning while preserving typos for humanized error reporting.

Malli transformer that selectively keywordizes map keys.
It interns only strings that exactly match schema keys. Near-miss strings
are retained as strings so Malli can provide spelling suggestions.

If `:strip-unknown-keys?` is truthy, all other keys are dropped. Otherwise,
unknown keys are retained as strings, even if they were originally keywords.

Prevents memory exhaustion (DoS) from arbitrary keyword interning
while preserving typos for humanized error reporting.
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