js-comment

macrosince v1.7.107Edit
(js-comment comment)

Source docstring:
Emit a top-level JavaScript multi-line comment. New lines will create a
new comment line. Comment block will be preceded and followed by a newline
Source code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro js-comment
  [comment]
  (core/let [[x & ys] (string/split comment #"\n")]
    (core/list 'js*
      (core/str
        "\n/**\n"
        (core/str " * " x "\n")
        (core/->> ys
          (map #(core/str " * " (string/replace % #"^   " "") "\n"))
          (reduce core/str ""))
        " */\n"))))