Skip to content

Commit 144a38c

Browse files
committed
docs
1 parent d99b52c commit 144a38c

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,26 @@ Doing stuff which takes a while
286286

287287
Also see [API docs](api.md).
288288

289+
## Js-interop
290+
291+
Since nbb v0.0.75 [applied-science/js-interop](https://github.com/applied-science/js-interop) is available:
292+
293+
``` clojure
294+
(ns example
295+
(:require [applied-science.js-interop :as j]))
296+
297+
(def o #js{:a 1 :b 2 :c 3})
298+
299+
(j/select-keys o [:a :b]))
300+
```
301+
302+
Most of this library is supported in nbb, except the following:
303+
304+
- destructuring using `:syms`
305+
- property access using `.-x` notation. In nbb, you must use keywords.
306+
307+
See the [example](examples/js-interop/example.cljs) of what is currently supported.
308+
289309
## Examples
290310

291311
See the [examples](examples) directory for small examples.

examples/js-interop/example.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(ns js-interop
1+
(ns example
22
(:require [applied-science.js-interop :as j]))
33

44
(def o #js{:x #js {:y 1 :someFn (fn [x] x)}

0 commit comments

Comments
 (0)