Utilities to work with API information about different platforms
Most of the time a function/namespace will have identical metadata when defined in Clojure and ClojureScript but sometimes they don't.
This namespace provides a MultiPlatform
record that aims to expose
a thing (namespace, var)'s properties while also retaining and exposing
information about platform differences.
Utilities to work with API information about different platforms Most of the time a function/namespace will have identical metadata when defined in Clojure and ClojureScript but sometimes they don't. This namespace provides a `MultiPlatform` record that aims to expose a thing (namespace, var)'s properties while also retaining and exposing information about platform differences.
(all-vals this k)
Return all non-nil values for the provided field k
.
Return all non-nil values for the provided field `k`.
(get-field this k)
(get-field this k platf)
Get a field k
and throw if the fields value varies across all provided platforms.
If platf
is provided return field k
as specified by platform platf
.
Get a field `k` and throw if the fields value varies across all provided platforms. If `platf` is provided return field `k` as specified by platform `platf`.
(platforms this)
Return a set of all platforms this thing supports.
Return a set of all platforms this thing supports.
(varies? this k)
Return true if there are more than 1 unique values for field k
Return true if there are more than 1 unique values for field `k`
(unify-defs platforms)
Takes a series of maps describing a single var across multiple platforms. Returns an instance of the MultiPlatform record that allows accessing fields in a platform-aware manner.
Takes a series of maps describing a single var across multiple platforms. Returns an instance of the MultiPlatform record that allows accessing fields in a platform-aware manner.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close