babashka / nbb

Scripting in Clojure on Node.js using SCI
Eclipse Public License 1.0
863 stars 52 forks source link

Add atom var #344

Closed logseq-cldwalker closed 9 months ago

logseq-cldwalker commented 9 months ago

Hi @borkdude. The motivation for adding this to nbb is I'd like to be able to check if something is an Atom e.g. (instance? cljs.core/Atom state). While loading this file into nbb, this was the only cljs code that couldn't load normally. I didn't add a test since I didn't see any for just var additions but happy to do so if you'd like


Please answer the following questions and leave the below in as part of your PR.

borkdude commented 9 months ago

Can you add a test as well? It's not obvious that the instance check will succeed.

logseq-cldwalker commented 9 months ago

Sure. Added

borkdude commented 9 months ago

Thanks! I assume you don't need a new release since you build your own nbb-logseq right?

logseq-cldwalker commented 9 months ago

Yep! There's no rush for a new release