Skip to content

chbrown/jurl-clojure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jurl

Clojars Project Codox-generated documentation for master Travis CI Build Status Coverage Status

Cross-platform URL parsing and manipulation.

Uses reader conditionals to support Clojure and ClojureScript, and thus requires Clojure 1.7.0 or newer.

Example

(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"]}

License

Copyright © 2017–2018 Christopher Brown. Eclipse Public License - v 1.0.

About

Cross-platform URL parsing / manipulation

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published