Permalink
Browse files

CLJS-722: Move nodejs string_print fiddling into a function

This is a bit more polite than doing it when the module loads, and lets
us use ClojureScript in node-like environments that don't expose "util"
  • Loading branch information...
1 parent cecc02b commit b299a6b1e9a522de0b1c3345f54f164bc3524f8f @travis travis committed with swannodette Dec 12, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/cljs/cljs/nodejs.cljs
@@ -8,4 +8,5 @@
(def process (js* "process"))
; Have ClojureScript print using Node's sys.print function
-(set! cljs.core/string-print (.-print (require "util")))
+(defn enable-util-print! []
+ (set! cljs.core/string-print (.-print (require "util"))))

0 comments on commit b299a6b

Please sign in to comment.