I've wrapped my random uuid generator up in a little library at:
https://github.com/franks42/cljs-uuid-utils
---
cljs-uuid-utils
ClojureScript micro-library with an implementation of a type 4, random UUID generator compatible with RFC-4122 and cljs.core/UUID (make-random-uuid), a uuid-string conformance validating predicate (valid-uuid?), and a UUID factory from uuid-string with conformance validation (make-uuid-from).
---
As mentioned before, clojure on the jvm can leverage the ubiquitous "java.util.UUID/randomUUID", while there is no generally available random uuid generator in the javascript world. Although this micro-lib addresses that issue somewhat, I believe that we should have a random-uuid generator as part of the batteries-included cljs-distro.
Another issue that I came across is the fact that the java.util.UUID/fromString does do a conformance check of the presented uuid-string, and throws an exception if it does not pass. ClojureScript's reader yields a cljs.core/UUID instance for uuid-literals, but doesn't check for any conformance and essentially accepts any string. This could lead to interesting, surprising bugs during cljs-clj interop.
Please let me know if you use this little library, and any suggestions/comments for improvement are always welcome.
Enjoy, FrankS.