Fork me on GitHub
#clojurescript
<
2022-12-27
>
hifumi12306:12:35

What is the difference between using js/goog and goog directly? I notice that my editor gives me autocomplete for js/goog but not goog, which makes writing the former tempting, but I'm wondering if there are any gotchas to doing so.

thheller06:12:17

what are you using from it? they are basically identical, so either is fine

hifumi12306:12:06

Methods like goog.string.collapseWhitespace... I'm making sure the namespaces of course require [goog.string] first.

thheller06:12:03

then its generally easier to alias. (:require [goog.string :as gstr]) (gstr/collapseWhitespace ...)

👍 2