mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 05:18:24 +02:00
✨ Add better uri constructor function
This commit is contained in:
parent
7553d68100
commit
a77edc5aa2
1 changed files with 16 additions and 1 deletions
|
@ -13,12 +13,27 @@
|
|||
#?(:clj
|
||||
(:import lambdaisland.uri.URI)))
|
||||
|
||||
(dm/export u/uri)
|
||||
(dm/export u/join)
|
||||
(dm/export u/parse)
|
||||
(dm/export u/query-encode)
|
||||
(dm/export un/percent-encode)
|
||||
(dm/export u/uri?)
|
||||
|
||||
(defn uri
|
||||
[o]
|
||||
(cond
|
||||
(u/uri? o)
|
||||
o
|
||||
|
||||
(map? o)
|
||||
(u/map->URI o)
|
||||
|
||||
(nil? o)
|
||||
o
|
||||
|
||||
:else
|
||||
(u/parse o)))
|
||||
|
||||
(defn query-string->map
|
||||
[s]
|
||||
(u/query-string->map s))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue