Skip to content
Parses arguments in your url.
JavaScript
Find file
Latest commit 1f54848 George Michael Brower bower.json
Failed to load latest commit information.
README.md bower
bower.json bower.json
test.html
url.js publish

README.md

url.js

A tiny library for getting variables out of your url. Nice for making dev flags and such.

URL expression result
host.com/?debug url.boolean('debug') true
host.com/ url.boolean('debug') false
host.com/?speed=5 url.number('speed') 5
host.com/ url.number('speed', 10) 10
host.com/?foo=bar&val=3 url.foo "bar"
host.com/?foo=bar&val=3 url.val "3"
host.com/#about url.hash "about"
Something went wrong with that request. Please try again.