How do I list the functions/vars of a ClojureScripts namespace ?
This is a question that has an equivalent for Clojure, but the solutions mentioned did not work for me.
How do I list the functions/vars of a ClojureScripts namespace ?
This is a question that has an equivalent for Clojure, but the solutions mentioned did not work for me.
ns-interns seems to do what you need. If you need the vars/fns of the current namespace, you can use *ns* in conjunction with it.
Usage:
(keys (ns-interns 'my-ns)) ;; All defined variables/functions of an arbitrary evaluated namespace
(keys (ns-interns *ns*)) ;; All defined variables/functions of the current namespace
Note that value of ns differs in run time and compile time and using CIDER/REPL also affects which ns is currently set. The latter works in my lein repl but not in my CIDER repl for example. This answer has a possible solution to that issue.