Skip to content
/ hex Public

Cross-platform hex {en,de}coding

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.md
MIT
LICENSE-MIT.md
Notifications You must be signed in to change notification settings

NuID/hex

Repository files navigation

nuid.hex

Cross-platform hex {en,de}coding.

Requirements

jvm, node + npm, clj, shadow-cljs

Clojure and ClojureScript

tools.deps:

{nuid/hex {:git/url "https://github.com/nuid/hex" :sha "..."}}

usage:

$ clj # or shadow-cljs node-repl
=> (require '[nuid.hex :as hex])
=> (def h (hex/encode "🐴"))    ;; defaults to reading input as utf8
=> h                            ;; => "f09f90b4"
=> (hex/decode h)               ;; => array-like: [240 159 144 180] (endianness may vary)
=> (hex/str h)                  ;; => "🐴"
=> (hex/str h :charset/utf16le) ;; => "鿰뒐"

Licensing

Apache v2.0 or MIT

Releases

No releases published

Packages

No packages published