Provide a convenient interface for defining tagged print handlers for custom
types. All register-...
functions take the same arguments: [type tag to-edn]
type
the type this handler is for (java.lang.Class
or JS constructor)tag
the symbol used as tag, without the #
to-edn
a function which takes the object to be printed, and returns plain
data (vectors, maps, etc)Provide a convenient interface for defining tagged print handlers for custom types. All `register-...` functions take the same arguments: `[type tag to-edn]` - `type` the type this handler is for (`java.lang.Class` or JS constructor) - `tag` the symbol used as tag, without the `#` - `to-edn` a function which takes the object to be printed, and returns plain data (vectors, maps, etc)
(register-pprint type tag to-edn)
Register pretty-print writer based on a class/type.
Register pretty-print writer based on a class/type.
(register-print type tag to-edn)
Register a regular print handler. Extends clojure.core/print-method
and
clojure.core/print-dup
on Clojure, and implements IPrintWithWriter
on
ClojureScript.
Register a regular print handler. Extends `clojure.core/print-method` and `clojure.core/print-dup` on Clojure, and implements `IPrintWithWriter` on ClojureScript.
(type-name t)
Given a class/type, return its name as a string. For ClojureScript this is a
best effort, and you may need to give it a hand by setting a .-name
property
on your constructor function.
Given a class/type, return its name as a string. For ClojureScript this is a best effort, and you may need to give it a hand by setting a `.-name` property on your constructor function.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close