(defn find-js-resources [path]
"Returns a seq of URLs to all JavaScript resources on the classpath or within
a given (directory) path on the filesystem. [path] only applies to the latter
case."
(let [file (io/file path)]
(if (.exists file)
(find-js-fs path)
(find-js-classpath path))))