Liking cljdoc? Tell your friends :D

cljdoc.platforms

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.
raw docstring

IMultiPlatformcljprotocol

all-valsclj

(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-fieldclj

(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`.

platformsclj

(platforms this)

Return a set of all platforms this thing supports.

Return a set of all platforms this thing supports.

varies?clj

(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`
source

multiplatform?clj

(multiplatform? x)
source

unify-defsclj

(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.
sourceraw docstring

unify-namespacesclj

(unify-namespaces platforms)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close