Liking cljdoc? Tell your friends :D

applied-science.js-interop

cljs

Functions for working with JavaScript that mirror Clojure behaviour.

Functions for working with JavaScript that mirror Clojure behaviour.
raw docstring

applyclj/s≠

clj
(apply obj k args)
cljs
(apply obj k arg-array)
source (clj)source (cljs)

assoc!clj/s≠

(assoc! obj & pairs)
cljs

Sets key-value pairs on obj, returns obj.

Sets key-value pairs on `obj`, returns `obj`.
source (clj)source (cljs)raw docstring

assoc-in!clj/s≠

clj
(assoc-in! obj ks v)
cljs
(assoc-in! obj [k & ks] v)

Mutates the value in a nested object structure, where ks is a sequence of keys and v is the new value. If any levels do not exist, objects will be created.

Mutates the value in a nested object structure, where ks is a
sequence of keys and v is the new value. If any levels do not
exist, objects will be created.
source (clj)source (cljs)raw docstring

assoc-in*cljs

(assoc-in* obj [k* & ks*] v)
source

callclj/s

(call obj k & args)
source (clj)source (cljs)

contains?cljs

(contains? obj k)
source

contains?*clj/s≠

clj
cljs
(contains?* obj k*)
source (clj)source (cljs)

empty-objclj

source

getclj/s≠

(get obj k)
(get obj k not-found)
cljs

Returns the value mapped to key, not-found or nil if key not present.

Returns the value mapped to key, not-found or nil if key not present.
source (clj)source (cljs)raw docstring

get-inclj/s≠

(get-in obj ks)
(get-in obj ks not-found)
cljs

Returns the value in a nested object structure, where ks is a sequence of keys. Returns nil if the key is not present, or the not-found value if supplied.

Returns the value in a nested object structure, where ks is
a sequence of keys. Returns nil if the key is not present,
or the not-found value if supplied.
source (clj)source (cljs)raw docstring

get-in*cljs

(get-in* obj ks*)
(get-in* obj ks* not-found)
source

JSLookupcljs

source

lookupcljs

(lookup obj)

Returns object which implements ILookup and reads keys from obj.

Returns object which implements ILookup and reads keys from `obj`.
sourceraw docstring

lookup-sentinelclj/s

source (clj)source (cljs)

objclj/s≠

(obj & keyvals)
cljs

Create JavaSript object from an even number arguments representing interleaved keys and values. Dot-prefixed symbol keys will be renamable.

Create JavaSript object from an even number arguments representing
interleaved keys and values. Dot-prefixed symbol keys will be renamable.
source (clj)source (cljs)raw docstring

push!clj/s

(push! a v)
source (clj)source (cljs)

reflect-propertyclj

source

select-keysclj/s≠

(select-keys obj ks)
cljs

Returns an object containing only those entries in o whose key is in ks

Returns an object containing only those entries in `o` whose key is in `ks`
source (clj)source (cljs)raw docstring

select-keys*cljs

(select-keys* obj ks*)

Returns an object containing only those entries in o whose key is in ks

Returns an object containing only those entries in `o` whose key is in `ks`
sourceraw docstring

unchecked-getclj/s

(unchecked-get obj k)
source (clj)source (cljs)

unchecked-setclj/s≠

clj
(unchecked-set obj & pairs)
cljs
(unchecked-set obj k val)
source (clj)source (cljs)

unshift!clj/s

(unshift! a v)
source (clj)source (cljs)

update!clj/s≠

(update! obj k f & args)
cljs

'Updates' a value in a JavaScript object, where k is a key and f is a function that will take the old value and any supplied args and return the new value, which replaces the old value. If the key does not exist, nil is passed as the old value.

'Updates' a value in a JavaScript object, where k is a key and
f is a function that will take the old value and any supplied
args and return the new value, which replaces the old value.
If the key does not exist, nil is passed as the old value.
source (clj)source (cljs)raw docstring

update-in!clj/s≠

(update-in! obj ks f & args)
cljs

'Updates' a value in a nested object structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, mutating the nested structure. If any levels do not exist, objects will be created.

'Updates' a value in a nested object structure, where ks is a
sequence of keys and f is a function that will take the old value
and any supplied args and return the new value, mutating the
nested structure.  If any levels do not exist, objects will be
created.
source (clj)source (cljs)raw docstring

update-in*cljs

(update-in* obj ks* f args)
source

wrap-keyclj/s≠

clj
(wrap-key k)
(wrap-key k obj)

Convert key to string at compile time when possible.

Convert key to string at compile time when possible.
cljs
(wrap-key k)

Returns k or, if it is a keyword, its name.

Returns `k` or, if it is a keyword, its name.
source (clj)source (cljs)raw docstring

wrap-keysclj

(wrap-keys ks)

Fallback to wrapping keys at runtime

Fallback to wrapping keys at runtime
sourceraw docstring

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

× close