parse-uuid

functionsince v1.11.50Edit
(parse-uuid s)

Source docstring:
Parse a string representing a UUID and return a UUID instance,
or nil if parse fails.
Grammar: https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html#toString--
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn parse-uuid
  [s]
  (if (string? s)
    (when ^boolean (re-matches uuid-regex s)
      (uuid s))
    (throw (js/Error. (parsing-err s)))))