Cross-platform URL parsing and manipulation.
Uses reader conditionals to support Clojure and ClojureScript, and thus requires Clojure 1.7.0 or newer.
(ns user
(:require [jurl.core :as jurl]))
URL-encoding and -decoding:
=> (jurl/encode "☺hai?")
"%E2%98%BAhai%3F"
=> (jurl/decode "http%3A%2F%2F%F0%9F%90%B4-e%F0%9F%93%9A.com")
"http://🐴-e📚.com"
Querystring parsing (use with js/window.location.search
in ClojureScript):
=> (jurl/search->seq "?uid=1&uid=5001")
(["uid" "1"] ["uid" "5001"])
=> (jurl/search->map "?uid=1&uid=5001&date=20170611")
{"uid" ["1" "5001"], "date" ["20170611"]}
Copyright © 2017–2018 Christopher Brown. Eclipse Public License - v 1.0.