Liking cljdoc? Tell your friends :D

resend-clojure.internal.util


api->cljclj

(api->clj body)

Recursively converts an API response map with snake_case string keys into a Clojure map with kebab-case keyword keys.

Example: (api->clj {"message_id" "abc" "created_at" "2024-01-01"}) ;; => {:message-id "abc" :created-at "2024-01-01"}

Recursively converts an API response map with snake_case string keys into
a Clojure map with kebab-case keyword keys.

Example:
  (api->clj {"message_id" "abc" "created_at" "2024-01-01"})
  ;; => {:message-id "abc" :created-at "2024-01-01"}
sourceraw docstring

clj->apiclj

(clj->api body)

Recursively converts a Clojure map with kebab-case keyword keys into a map with snake_case string keys ready for JSON serialisation.

Example: (clj->api {:from "a@b.com" :reply-to ["c@d.com"]}) ;; => {"from" "a@b.com" "reply_to" ["c@d.com"]}

Recursively converts a Clojure map with kebab-case keyword keys into a
map with snake_case string keys ready for JSON serialisation.

Example:
  (clj->api {:from "a@b.com" :reply-to ["c@d.com"]})
  ;; => {"from" "a@b.com" "reply_to" ["c@d.com"]}
sourceraw docstring

remove-nilsclj

(remove-nils m)

Removes nil-valued entries from a map (non-recursive). Useful before serialising a payload so optional fields are omitted.

Removes nil-valued entries from a map (non-recursive).
Useful before serialising a payload so optional fields are omitted.
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