You probably should include the namespace and function in each file where you use it, I don't think any other solution would be a good practice.
(ns app.whatever
(:require [app.utils :only [format]]))
문제
Since cljs doesnt have a format function, I need to define one myself
if i have a src file with following:
(ns formatter
(:require [goog.string :as gstring]
[goog.string.format]))
(defn format
"Formats a string using goog.string.format."
[fmt & args]
(apply gstring/format fmt args))
how do I make format
function available in all my src files?
해결책
You probably should include the namespace and function in each file where you use it, I don't think any other solution would be a good practice.
(ns app.whatever
(:require [app.utils :only [format]]))