Giter Site home page Giter Site logo

cljs-uuid-utils's People

Contributors

franks42 avatar lbradstreet avatar robert-stuttaford avatar viebel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cljs-uuid-utils's Issues

Trouble with types

Hi!

Something is wrong with the types of generated UUIDs. Sorry for such a vague statement, I've been toying with js/cljs for about two weeks now, so I don't understand what is going on here.

Here is some code:

(def a (uuid/make-random-uuid))
(def b (uuid/make-uuid-from (str a)))
(type a) ; cljs.core/UUID
(type b) ; cljs.core/UUID
(= a b) ; false
(= a a) ; true
(= b b) ; true
(= a (uuid/make-uuid-from (str a))) ; false
(= b (uuid/make-uuid-from (str b))) ; true

uuid internals problem

this fails:
(> (cljs-uuid-utils/make-random-uuid) (cljs-uuid-utils/make-random-uuid))

also, .toString on UUIDs created by this lib does not return what i expect.

calling .toString on construction would fix these issues... but I see there is another v.similar cljs uuid lib that seems ok, so maybe take this one down from clojars? thanks

Switch from single segment namespace

I get the following warning with the latest Clojurescript [org.clojure/clojurescript "0.0-2913"]:

WARNING: cljs-uuid-utils is a single segment namespace at line 9 cljs_uuid_utils.cljs

Helper

It'd be great if your library included this simple fn:

(defn uuid-string
  [uuid]
  (str (.-uuid uuid)))

The reader literal is great, too, but sometimes you just want the 'raw' string, eg, for use on HTTP query-strings.

Of course, it should do the right thing if uuid isn't a cljs.core/uuid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.