    string / string
    pattern / (string or function of match)."
   [s match replacement]
-  (cond (string? match)
-        (.replace s (js/RegExp. (gstring/regExpEscape match) "g") replacement)
-        (instance? js/RegExp match)
-        (.replace s (js/RegExp. (.-source match) "g") replacement)
-        :else (throw (str "Invalid match arg: " match))))
+  (cond
+    (string? match)
+    (.replace s (js/RegExp. (gstring/regExpEscape match) "g") replacement)
+
+    (instance? js/RegExp match)
+    (.replace s (js/RegExp. (.-source match) "g") replacement)
+
+    :else (throw (str "Invalid match arg: " match))))
 
 (defn replace-first
   "Replaces the first instance of match with replacement in s.

  [s limit]
  (if (or (<= limit 0) (>= limit (+ 2 (count s))))
    (conj (vec (cons "" (map str (seq s)))) "")
    (condp = limit
      1 (vector s)
      2 (vector "" s)
      (let [c (- limit 2)]

     (split s re 0))
    ([s re limit]
     (discard-trailing-if-needed limit
       (if (identical? "/(?:)/" (str re))
         (split-with-empty-regex s limit)
         (if (< limit 1)
           (vec (.split (str s) re))
           (loop [s s
                  limit limit
                  parts []]
             (if (== 1 limit)
               (conj parts s)
               (let [m (re-find re s)]
                 (if-not (nil? m)
                   (let [index (.indexOf s m)]
                     (recur (.substring s (+ index (count m)))
                       (dec limit)
                       (conj parts (.substring s 0 index))))
                   (conj parts s))))))))))

(defn split-lines
  "Splits s on \n or \r\n."
