cljs.repl/skip-if-eol

functionsince v0.0-2719Edit
(skip-if-eol s)

Source docstring:
If the next character on stream s is a newline, skips it, otherwise
leaves the stream untouched. Returns :line-start, :stream-end, or :body
to indicate the relative location of the next character on s. The stream
must either be an instance of LineNumberingPushbackReader or duplicate
its behavior of both supporting .unread and collapsing all of CR, LF, and
CRLF to a single \newline.
Source code @ clojurescript:src/main/clojure/cljs/repl.cljc
(defn skip-if-eol
  [s]
  (let [c (readers/read-char s)]
    (case c
      \newline :line-start
      nil :stream-end
      (do (readers/unread s c) :body))))