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)

assoc!clj/s≠

(assoc! obj & pairs)
cljs

Sets key-value pairs on obj, returns obj.

Sets key-value pairs on `obj`, returns `obj`.
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.
raw docstring

assoc-in*cljs

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

callclj/s

(call obj k & args)

contains?cljs

(contains? obj k)

contains?*clj/s≠

clj
cljs
(contains?* obj k*)

empty-objclj


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

get-in*cljs

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

JSLookupcljs


lookupcljs

(lookup obj)

Returns object which implements ILookup and reads keys from obj.

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

lookup-sentinelclj/s


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

push!clj/s

(push! a v)

reflect-propertyclj


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

unchecked-getclj/s

(unchecked-get obj k)

unchecked-setclj/s≠

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

unshift!clj/s

(unshift! a v)

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

update-in*cljs

(update-in* obj ks* f args)

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

wrap-keysclj

(wrap-keys ks)

Fallback to wrapping keys at runtime

Fallback to wrapping keys at runtime
raw docstring

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

× close