Welcome! Please see the About page for a little more info on how this works.

+2 votes
in ClojureScript by

Clojure has clojure.string/sre-quote-replacement, but not in ClojureScript.

for this now, we need use the conditional reader in cljc file
`
(defn foo (link: s)
#?(:clj (str/re-quote-replacement s)

 :cljs (gstr/regExpEscape s)))

`

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2165 (reported by isaac-zeng)
...