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 only interns strings that match schema keys exactly or appear to be misspellings (fuzzy match).

If :strip-unknown-keys? is truthy, all other keys are dropped; otherwise otherwise they are left as strings. (Note that unknown keys are converted to 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 only interns strings that match schema keys exactly or appear to be
misspellings (fuzzy match).

If `:strip-unknown-keys?` is truthy, all other keys are dropped; otherwise
otherwise they are left as strings.  (Note that unknown keys are converted
to 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