What is the ClojureScript analogue of typeof ... undefined from JavaScript? -


i'm seeing lots of code using pattern:

if (typeof a.b === 'undefined') { ... 

now i'm translating to:

(if (nil? (-.b a)) ... 

is appropriate - or losing crucial data?

my question is: what clojurescript analogue of typeof ... undefined javascript?

for checking possibly undefined references can use cljs.core/exists?:

(when-not (exists? js/unknownreference)   ...) 

Comments

Popular posts from this blog

libGdx unable to find files in android application data directory -

php - Webix Data Loading from Laravel Link -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -