A format is a function [realm] => formatter, which should return nil for unsupported realms.
This namespace contains utilities to create and use such functions.
A format is a function [realm] => formatter, which should return nil for unsupported realms. This namespace contains utilities to create and use such functions.
(combine-formats & formats)Combines multiple formats into one. Earlier formatters for a realm take precedence over later ones.
Combines multiple formats into one. Earlier formatters for a realm take precedence over later ones.
(concat-formats & formats)Concatenate the given formats, ie. translate a value through all of the given formats, left to right for 'to external', and right to left for 'from external'.
Concatenate the given formats, ie. translate a value through all of the given formats, left to right for 'to external', and right to left for 'from external'.
The empty format that supports nothing.
The empty format that supports nothing.
(get-translator format realm)Resolves the translator for the given realm in the given format, or throws unsupported-exn.
Resolves the translator for the given realm in the given format, or throws [[unsupported-exn]].
A format that keeps all values as they are.
Note that this still resolves any nested realms, so if you combine this with a format that for example translates integers, you get sequences of integers for free.
A format that keeps all values as they are. Note that this still resolves any nested realms, so if you combine this with a format that for example translates integers, you get sequences of integers for free.
(unsupported-exn realm)(unsupported-exn? e)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 |