Liking cljdoc? Tell your friends :D
ClojureScript only.

cljs-bean.core


->cljcljs

(->clj x)
(->clj x & opts)

Recursively converts JavaScript values to ClojureScript.

JavaScript objects are converted to beans with keywords for keys.

JavaScript arrays are converted to read-only implementations of the vector abstraction, backed by the supplied array.

By default, ->clj produces values that keywordize the keys. Supply :keywordize-keys false to suppress this behavior. You can alternatively supply :prop->key and :key->prop with functions that control the mapping between properties and keys.

Supply :transform and a function of one argument to transform values being converted from JavaScript to ClojureScript. This function should return nil if no conversion is to be performed, thus allowing default logic to be applied.

Recursively converts JavaScript values to ClojureScript.

JavaScript objects are converted to beans with keywords for keys.

JavaScript arrays are converted to read-only implementations of the vector
abstraction, backed by the supplied array.

By default, ->clj produces values that keywordize the keys. Supply
:keywordize-keys false to suppress this behavior. You can alternatively
supply :prop->key and :key->prop with functions that control the mapping
between properties and keys.

Supply :transform and a function of one argument to transform values being
converted from JavaScript to ClojureScript. This function should return nil
if no conversion is to be performed, thus allowing default logic to be applied.
sourceraw docstring

->jscljs

(->js x)
(->js x & opts)

Recursively converts ClojureScript values to JavaScript.

Where possible, directly returns the backing objects and arrays for values produced using ->clj and bean.

Otherwise delegates to clj->js to perform the conversion, converting keyword keys using their qualified names. You can alternatively supply :key->prop with a function that controls the mapping from keys to properties.

Recursively converts ClojureScript values to JavaScript.

Where possible, directly returns the backing objects and arrays for values
produced using ->clj and bean.

Otherwise delegates to clj->js to perform the conversion, converting keyword
keys using their qualified names. You can alternatively supply :key->prop with
a function that controls the mapping from keys to properties.
sourceraw docstring

beancljs

(bean)
(bean x)
(bean x & opts)

Takes a JavaScript object and returns a read-only implementation of the map abstraction backed by the object.

By default, bean produces beans that keywordize the keys. Supply :keywordize-keys false to suppress this behavior. You can alternatively supply :prop->key and :key->prop with functions that control the mapping between properties and keys.

Supply :recursive true to create a bean which recursively converts JavaScript object values to beans and JavaScript arrays into vectors.

Supply :transform and a function of one argument to transform values being converted from JavaScript to ClojureScript. This function should return nil if no conversion is to be performed, thus allowing default logic to be applied.

Calling (bean) produces an empty bean.

Takes a JavaScript object and returns a read-only implementation of the map
abstraction backed by the object.

By default, bean produces beans that keywordize the keys. Supply
:keywordize-keys false to suppress this behavior. You can alternatively
supply :prop->key and :key->prop with functions that control the mapping
between properties and keys.

Supply :recursive true to create a bean which recursively converts
JavaScript object values to beans and JavaScript arrays into vectors.

Supply :transform and a function of one argument to transform values being
converted from JavaScript to ClojureScript. This function should return nil
if no conversion is to be performed, thus allowing default logic to be applied.

Calling (bean) produces an empty bean.
sourceraw docstring

bean?cljs

(bean? x)

Returns true if x is a bean.

Returns true if x is a bean.
sourceraw docstring

objectcljs

(object b)

Takes a bean and returns a JavaScript object.

Takes a bean and returns a JavaScript object.
sourceraw docstring

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

× close