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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

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