We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rudimentary version, cljs.analyzer should be replaced with SCI specifics.
(defn ^:macro exists?* "Return true if argument exists, analogous to usage of typeof operator in JavaScript." [_ _ x] (if (symbol? x) (let [x (cond-> (str x) #_(:name (cljs.analyzer/resolve-var &env x)) (= "js" (namespace x)) name) segs (str/split (str (str/replace (str x) "/" ".")) #"\.") n (count segs) syms (map #(vary-meta (symbol "js" (str/join "." %)) assoc :cljs.analyzer/no-resolve true) (reverse (take n (iterate butlast segs)))) js (str/join " && " (repeat n "(typeof ~{} !== 'undefined')"))] (list 'boolean (concat (list 'js* js) syms))) `(some? ~x)))
The text was updated successfully, but these errors were encountered:
5940d69
No branches or pull requests
Rudimentary version, cljs.analyzer should be replaced with SCI specifics.
The text was updated successfully, but these errors were encountered: