Decentralized, k-ordered unique ID generator.
Copy from https://github.com/Factual/skuld/blob/master/src/skuld/flake.clj and https://github.com/maxcountryman/flake
[]
For example:
=> (require '[flake.core :as flake])
=> (flake/init!)
;; encode default to base62, safe operation
=> (flake/id)
"GdYPPDcoLxO4NyoZRTVQHYj"
=> (flake/id {:encode :int})
114338374141286187205851229083666043835927N
=> (flake/id {:encode :int
:unsafe? true}
6198295858610941460481N
=> (flake/id {:encode :bytes})
#object["[B" 0x61d495da "[B@61d495da"]
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close