-
Notifications
You must be signed in to change notification settings - Fork 1
/
util.cljc
36 lines (25 loc) · 874 Bytes
/
util.cljc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(ns uniformity.util
(:require #?(:clj [uniformity.internals.java.util :as internals]
:cljs [uniformity.internals.js.util :as internals])))
(defn base64-encode [bytes]
(internals/base64-encode bytes))
(defn base64-encode-urlsafe [bytes]
(internals/base64-encode-urlsafe bytes))
(defn base64-decode [string]
(internals/base64-decode string))
(defn hex-encode [bytes]
(internals/hex-encode bytes))
(defn hex-decode [string]
(internals/hex-decode string))
(defn json-encode [object]
(internals/json-encode [object]))
(defn json-decode [string]
(internals/json-decode string))
(defn msgpack-serialize [object]
(internals/msgpack-serialize object))
(defn msgpack-deserialize [bytes]
(internals/msgpack-deserialize bytes))
(defn str->utf8 [string]
(internals/str->utf8 string))
(defn utf8->str [bytes]
(internals/utf8->str bytes))